How to make category RSS feeds show full content

Full Text Feed plugin shows full content….follow the installation steps there,and then goto settings->Reading->For each article in a feed, show=>select Full text and save.it’ll work.if you want to implement via the code means, <?php if (get_option(‘rss_use_excerpt’)) : ?> <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> <?php else : ?> <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> <?php if ( strlen( $post->post_content ) > … Read more

Remove specific category from a post

You want wp_remove_object_terms(). if ($category->name == “Uncategorized”) { wp_remove_object_terms( $post_ID, ‘uncategorized’, ‘category’ ); } Untested but “Attachments” are pretty much just posts under the hood, so I am fairly sure that should work.

has_category() for parent category

To do what you want, you’ll need to get a list of all the child categories of the category you want, and then check those. But you don’t need to write that list manually. You can use get_term_children() to get the IDs of the child and grandchild categories: $cat_id = get_cat_ID( ‘FAQ’ ); $children = … Read more

Get all the blog’s categories and the related URLs?

get_categories() is just a wrapper for get_terms(), and you can use either function to get all the blog’s categories which I assume are of the standard category taxonomy?; however, you can set a custom taxonomy when calling get_categories(), and one good reason to using get_categories() instead of get_terms() is that the output is always an … Read more

Add custom category name as data-filter to switch between these categories

To get all the categories, you need to use get_terms(). Give the taxonomy slug. Here “kormo-portfolio-cat” is used. Then the category list is retrieved like this: $cats = get_terms(‘kormo-portfolio-cat’); Let’s check, echo “<pre>”; print_r($cats); echo “</pre>”; We will see the code like these Array ( [0] => WP_Term Object ( [term_id] => 7 [name] => … Read more

Get sticky post from category?

Use the below code in the mainpage template to show the sticky posts. <?php $args = array( ‘cat’ => 42, ‘posts_per_page’ => 10, ‘post__in’ => get_option( ‘sticky_posts’ ), ); // The Query $the_query = new WP_Query( $args ); // The Loop while ( $the_query->have_posts() ) { $the_query->the_post(); echo ‘<li>’ . get_the_title() . ‘</li>’; } The … Read more

Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?

This worked fine for me, except the whole system above has some issue with my configuration (I made my wp installation Multisite) that broke all the other posts. They are all not-found, although the permalink is retrieved correctly every time, as it was found. I’m opening a new question for that other issue here so … Read more