Tag Info

New answers tagged

0

Finally I find solution to hide that particular category which is showed in front end, I use this code to hide the selected category front end : Function.php add_filter('get_the_terms', 'hide_categories_terms', 10, 3); function hide_categories_terms($terms, $post_id, $taxonomy){ // list of category slug to exclude, $exclude = array('computer'); if ...


0

Paste this in your functions.php and replace your-cpt. /** * Filter the feed, exclude specific custom post type * * @param WP_Query object $query * @return void */ function wpse_191804_pre_get_posts( $query ) { // only for feeds if( !$query->is_feed || !$query->is_main_query() ) return query; $exclude = 'your-cpt'; $post_types = ...


0

If you are using W3 Total Cache or any other caching system make sure it does not cache the feeds. WordPress uses SimplePie for parsing it's feeds. They are many things that are happening at the same time that can cause some confusion. First SimplePie does cache the feeds, I haven't figured yet how to clear it or where it is stored. But you can use this ...


1

If someone happens upon this and doesn't have the option to change the feed length, my solve was to use an array of feed pages: fetch_feed( array('http://example.com/feed/', 'http://example.com/feed/?paged=2', 'http://example.com/feed/?paged=3') );


0

you can use regular expression on your post content.Which could be done for example like this: for reference $content = get_the_content(); // we need a expression to match things $regex = '/src="([^"]*)"/'; // we want all matches preg_match_all( $regex, $content, $matches ); // reversing the matches array $matches = array_reverse($matches); echo ...



Top 50 recent answers are included