The following sql code snippet will set all posts/entries in WordPress as draft.
UPDATE wp_posts
SET wp_posts.post_status = 'draft'
WHERE wp_posts.post_type ='post';
The following sql code snippet will set all posts/entries in WordPress as draft.
UPDATE wp_posts
SET wp_posts.post_status = 'draft'
WHERE wp_posts.post_type ='post';
<?php
/* Disable the Admin Bar. */
remove_action( 'init', 'wp_admin_bar_init' );
?>
The functions.php file is located inside the theme directory. You need to create one, if it does not exists yet.
function add_fb($content) {
$fb = ''; // display only on single page.
if (is_single()) {
$fb = '<iframe src="http://www.facebook.com/plugins/like.php?href=';
$fb .= urlencode(get_permalink(get_the_ID()));
$fb .= '&layout=standard&show_faces=false&width=450&';
$fb .= 'action=like&colorscheme=light"';
$fb .= ' style="border:none; overflow:hidden; width:450px; ';
$fb .= 'height:60px"></iframe>';
}
// display before the content.
return $fb . $content;
// display after the content.
// return $content . $fb;
}
add_filter('the_content', 'add_fb');
Word cloud created with Wordle |
/* Disable Auto Adding of wp.me Shortlink */
remove_action('wp_head', 'shortlink_wp_head');
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol
? 'https://ssl' : 'http://www')
+ '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
</script>
The second half (before </body> the tag). <script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol
? 'https://ssl' : 'http://www')
+ '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
Figure 1: Steps to enable Rewrite Module on WAMPSERVER |
pre{ font-size:12px; background:#fff; border:1px solid #000; line-height:20px; width:600px; overflow:auto; overflow-y:hidden; margin:0; padding:0; } pre code{ font-family:Monaco,Courier; display:block; margin:0 0 0 40px; padding:18px 0; }
<pre><code>def f(): txt = "Some sample code" return txt </code></pre>
[sourcecode language='python']
your code here
[/sourcecode]
<?php if ( $paged < 2 ) { ?>
Your text or image for the first page goes here!
<?php } else { ?>
automatic_feed_links(false);
<?php
echo str_replace('<br />',' | ',
wp_list_categories('style=&echo=0&title_li='));
?>
<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>
<?php comments_number('No Comments', 'One Comment', '% Comments'); ?>
img.avatar { float:right; margin:0 0 0 10px; padding:3px; }
function remove_generator()
{
return '';
}
add_filter('the_generator','remove_generator');
<?php remove_action('wp_head', 'wp_generator'); ?>
<?php
global $wp_query;
query_posts(
array_merge(
array('showposts' => -1),
array('offset'=>1),
$wp_query->query
)
);
?>