mmorpglife
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] LS Cache purging all although auto purge options disabledI do have a recent posts widget in the sidebar on desktop. Option in Auto Purge Rules for “”All pages with Recent Posts Widget” is disabled. Shouldn’t, because of that, 447_W.recent-posts-2 never be included?
Cache Crawler (@serpentdriver)
3 days, 20 hours ago
This “error” only occures if a script tag has no src attribute. It would be up to LiteSpeed only to set defer attribute if there is a resource to a file and not an inline ressource.That is why I’m posting this on the litespeed support forum hoping they fix their code and not introduce an inline script with defer attribute without a src attribute.
Forum: Fixing WordPress
In reply to: exclude_category Doesn't work with WordPress 3.1If you want to fix it for multiple categories on your own without using a plugin you can change your exclude function to something like this:
function exclude_category($query) {
$exclude_categories=array(‘-1′,’-2′,’-3′,’-4′);
if ( $query->is_home ) {
$query->set(‘category__not_in’, $exclude_categories);
}
return $query;
}
add_filter(‘pre_get_posts’, ‘exclude_category’);NOTE: use your own category number in the $exclude_categories array.
NOTE 2: I’ve noticed that using positive numbers for categories works just as well.Forum: Plugins
In reply to: [Plugin: Exec-PHP] Shows PHP Code on Non-Homepage Post ListingsI had the same problem. This seems to be caused by one of WordPress’ native functions force_balance_tags. This function worked before as well on the content of your blog but for some reason exec-php executed before this filter. In any case, the way I resolved it is I added these lines to exec-php file /include/runtime.php function filter_user_content($content).
if(strpos($content,'< ?php ')!==FALSE) { $content=str_replace('< ?php','<?php',$content); }
Now it executes the code properly. The problem with this approach is that once you upgrade exec-PHP and they do not include this fix or provide another one for this particular problem you will again have this nasty bug. I resolved this by making a small plugin of my own called my-fixes.php. Put it in the plugins folder. and has this code in it:
add_filter('the_content', 'my_filter_php_tag', 0); //fix for exec-php plugin and wordpress 2.8 and messed up php tag function my_filter_php_tag($content) { if(strpos($content,'< ?php ')!==FALSE) { $content=str_replace('< ?php','<?php',$content); } return $content; }
Hope this helps…