This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$postscount = 5; | |
$param = array ( | |
'post__in' => get_post_commented($post_id = NULL), | |
'orderby' => 'comment_count', | |
'posts_per_page' => $postscount | |
); | |
$most_popular = new WP_Query($param); | |
echo '<ul>'; | |
while ($most_popular->have_posts()) : $most_popular->the_post(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Protect Readme files | |
<FilesMatch "readme.html"> | |
order allow,deny | |
deny from all | |
satisfy all | |
</FilesMatch> | |
<FilesMatch "readme.txt"> | |
order allow,deny | |
deny from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wpse_footer_db_queries(){ | |
echo '<!-- '.get_num_queries().' queries in '.timer_stop(0).' seconds. -->'.PHP_EOL; | |
} | |
add_action('wp_footer', 'wpse_footer_db_queries'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN supercache | |
<IfModule mod_mime.c> | |
<FilesMatch "\.html\.gz$"> | |
ForceType text/html | |
FileETag None | |
</FilesMatch> | |
AddEncoding gzip .gz | |
AddType text/html .gz | |
</IfModule> | |
<IfModule mod_deflate.c> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$content = apply_filters('the_content', $post->post_content); | |
$save = explode("</p>", $content); | |
$tcount = 0; | |
$adon = 0; | |
foreach($save as $item) { | |
echo $item; | |
echo "</p>"; | |
if(preg_match('/<p> /',$item) == 0 && $tcount >= 1 && $adon == 0) { | |
$adon=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Generate feedburner urls | |
*/ | |
function create_feed_data($feed_list) { | |
// create feed url for each category in given array | |
foreach($feed_list as $feed_slug => $feed_name) { | |
$feed_url = $feed_slug; | |
} | |
// create html input feed for each category in given array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Full Archive | |
*/ | |
?> | |
<?php | |
/** | |
* The template for displaying pages | |
* | |
* This is the template that displays all pages by default. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /media/ | |
RewriteRule ^resizer/(.*)x(.*)/r/(.*) resizer/resize.php?src=http://sitename.com/wp-content/uploads/$3&h=$2&w=$1&zc=0&s=1 | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$param = array( | |
'post_status' => 'future', | |
'order' => 'ASC', | |
'post_per_page' => '5' | |
); | |
$scheduled_posts = new WP_Query($param); | |
if ($scheduled_posts->have_posts()) : | |
while ($scheduled_posts->have_posts()) : $scheduled_posts->the_post(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<ins class="adsbygoogle" | |
style="display:block" | |
data-ad-client="ca-pub-XXXXXXXXXXXXXXX" | |
data-ad-slot="XXXXXXXXXX" | |
data-ad-format="auto"> | |
</ins> | |
<script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> |