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

update_post_meta not working

You are most likely not assigning the right page template. Make sure your template name is the same case as the file in your theme directory. Also make sure the file name you provide as the template actually exists in the theme directory otherwise it will be marked as the Default page template.

wp_pagination not displaying at top of page

query_posts() overwrites the original query, and the pagination gets the original before the query_posts() call and the changed after it. Solution: Don’t use query_posts(), filter pre_get_posts instead. We have tons of examples for that on our site. 🙂 Here is some pseudo code (meaning: not tested). add_filter( ‘pre_get_posts’, ‘wpse_58843_list_cat_16’ ); function wpse_58843_list_cat_16( $query ) { … Read more

Updates for a private plugin?

Since WordPress v5.8, it is a lot simpler to create yourself a basic version of custom plugin update functionality. Step 1 Create JSON file on your server. It will contain info about latest version number of your plugin(s) and link to ZIP file(s) for WordPress to automatically download it when update is triggered. Example location: … Read more

wp_update_post call really slow when official Facebook plugin is installed

This is beacuse facebook plugins does some really intensive checks on every save_post and this slows down calls to wp_update_post and wp_save_post to a crawl ( about 2 seconds for each call ). If you want you can remove them remove_action( ‘save_post’, ‘fb_add_page_mention_box_save’ ); remove_action( ‘save_post’, ‘fb_add_friend_mention_box_save’ ); The crazy thing is that facebook does … Read more