Modify request query string before plugins
Modify request query string before plugins
Modify request query string before plugins
I just had to clean buffer and then do my stuffs and call exit ob_clean(); //clear buffer header(‘Content-type: text/xml’); header(‘Content-Disposition: attachment; filename=”text.xml”‘); echo $xml->asXML(); exit();
You need to use functions like add_action() or add_filter(). Suppose you want to add a plugin’s functionality after the content of each blog post, use: add_action( ‘the_content’, ‘plugins_function_name’ );
You can insert something like this: <p class=”description”>This is my description</p> The description class is a built in WP class that will produce the style of text you pointed out in your image.
You can use the template tag is_feed() to determine if the current request is for a feed: if ( is_feed() ) { // It’s a feed! } else { // Regular ‘ol WordPress } Note you’ll need to use the function after the request has been parsed (i.e. on or after the parse_query hook).
Best practice: What belongs in theme and what in plugin for large eCommerce website
The answer is to specify all the args on the add_filter() call, and then you can have both the array of posts and the query sent to the callback. add_filter( ‘posts_results’, ‘do_stuff’, 10, 2 );
The problem was caused by canonical meta tag (thanks @Milo), as it had the same value for all of these pages. You have to avoid using the same value for canonical meta tag for pages with dynamic content. I changed it to be unique for every page. However it took google more than one month … Read more
You will have to create a settings page on which you will have to register your settings. Unfortunately this is no easy task, but it has been very well documented on tutsplus. Once you have implemented the settings api, you can check for the options that have been set with your settings page. Depending on … Read more
I believe you can get the same result what you are looking for with filter hook post_updated_messages. You just need the post id for the confirmation thing that you are doing which you can do over here as well using $_GET[‘post’] which contains your post id. Here is function which will do the thing. function … Read more