WordPress blog code format

You need to wrap your code in either code or pre tags. code is for when inline code in a sentence e.g. include(“hello.php”) whereas pre is for preformatted blocks of text e.g.: function hello_world(){ echo ‘hello world’; } For code highlighting etc, you’ll need to look for plugins. The easiest way of using these tags … Read more

Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed

It took me a while but I figured it out, I just placed this in mu functions.php file: function remove_se_filters($query) { if($query->is_feed && $query->is_category){ global $wp_filter; foreach($wp_filter[‘pre_get_posts’][999] as $key=>$filter){ if(strpos($key, ‘se_filters’) !== false){ unset($wp_filter[‘pre_get_posts’][999][$key]); } } } return $query; } add_filter(‘pre_get_posts’,’remove_se_filters’); I found that I couldn’t use the remove filter function because I did not … Read more

apply_filters, EMBEDS and AJAX not a friends? [duplicate]

As you haven’t posted, what exactly you’re doing with AJAX, we can just guess. And I guess, that you’re doing it extremly wrong – no need to “hook/filter” in ajax. AJAX is for admin(?) Basically, AJAX stuff is meant to be admin stuff. This means, that you got a wp_ajax_ hook and a wp_ajax_nopriv_ hook, … Read more