Remove Actions added by SEO ultimate Plugin
You have to use the same priority, and you need access to the global variable: function remove_seo_header() { remove_action( ‘wp_head’, array( $GLOBALS[‘seo_ultimate’], ‘template_head’ ), 2 ); }
You have to use the same priority, and you need access to the global variable: function remove_seo_header() { remove_action( ‘wp_head’, array( $GLOBALS[‘seo_ultimate’], ‘template_head’ ), 2 ); }
the_posts does work for all queries including the main query as well as custom queries but doesn’t work when using get_posts(). This is because get_posts() automatically suppresses all the filters. If you want to use the filters even when using get_posts, you can pass an extra key ‘suppress_filters’ => false in the array you pass … Read more
Old Q, but I’ll give my 2 cents. The walker class should inherit Walker_Page, not Walker_Nav_Menu as is usually the case with guides on the ‘net. The $item object is a Post Object, containing post_title and ID. To output the URL, you need to call get_permalink($item-ID). Regarding $item->url, it will be unset. Both theme_location and … Read more
I have fixed the problem. The main problem was that I was calling the function mb_find_my_image from index.php. After I’ve removed the calling from index.php, everything works as it should.
I am not sure there is a canonical answer to this question but there is a login_redirect hook which, from the Codex, is explicitly “to change the location redirected to after logging in.” But I offer that with caution. I don’t know what the s2Member plugin is doing or why it is doing whatever it … Read more
I think the best solution, as discussed in chat, is point 3, programmatically adding a draft (or custom post status) via the use of wp_insert_post where amongst other parameters you can set the likes of; ‘post_date’ => [ Y-m-d H:i:s ] //The time post was made. ‘post_date_gmt’ => [ Y-m-d H:i:s ] //The time post … Read more
Right, seems a little empty here but I figured out the problem myself, again. The trick was to have empty values in the $output variables. So $output .=”<option value=””>Select taxonomy #1</option>”; NOT $output .=”<option value=”#”>Select taxonomy #1</option>”; This is how you can create two dropdown menus and filter out your posts using your custom taxonomies. … Read more
There’s author_can() for that: add_action( ‘loop_start’, ‘wpse105294_nofollow_author’ ); function wpse105294_nofollow_author() { ! author_can( $GLOBALS[‘post’]->ID, ‘edit_others_posts’ ) AND add_filter( ‘the_content’, ‘cn_nf_url_parse’); } So you only add that filter callback for authors and other roles that don’t have the possibility to edit_others_posts. By default this is Subscriber and Author. For more info, take a look at the … Read more
WordPress does not concatenate the entire page into a string before printing it which is what would have to happen to “capture” the whole page template. Much of the page echos as it occurs– think about template tags like the_content and the_title which don’t return strings. The just echo them. You’d have to use output … Read more
Using a snippet of code like this: $hook_name=”the_content”; global $wp_filter; var_dump($wp_filter[$hook_name]); I was able to find a list of all hooked callback functions to the WordPress filter: the_content. I then located a few possible culprits, then searched for their function existence. After narrowing down my list, I came to the conclusion on the hooked callback … Read more