the_content() not showing full posts in category template

Try this <?php global $post; ?> <article id=”post-<?php the_ID(); ?>” <?php post_class( ‘entry’ ); ?><?php echo et_fable_get_background(); ?>> <div class=”container clearfix”> <header class=”entry-title”> <?php if ( is_single() ) : ?> <h1><?php the_title(); ?></h1> <?php else : ?> <h2> <a href=”https://wordpress.stackexchange.com/questions/208008/<?php the_permalink(); ?>”><?php the_title(); ?></a> </h2> <?php endif; ?> <?php //et_fable_post_meta(); ?> </header> <?php if ( … Read more

Loop doesn’t work

This should work (if your post_type is not post you will need to amend the code) <?php $args = array( ‘post_type’ => ‘post’, ‘cat’ => ’31’, ‘posts_per_page’ => 5, ); $query = new WP_Query( $args );?> <?php if( $query->have_posts() ) : ?> <?php while( $query->have_posts() ) : $query->the_post(); ?> <li><a href=”https://wordpress.stackexchange.com/questions/209558/<?php the_permalink(); ?>”><i class=”fa fa-book”></i> … Read more

Assign a category to all articles

If you can access the database directly, you could Check for the ID of the category you want to assign Check for the Author ID Then run the following MySql (on your own risk): INSERT INTO `#__term_relationships` ( object_id, term_taxonomy_id ) SELECT ID, 1 FROM `#__posts` WHERE `post_type` = ‘post’ // where 1 is your … Read more

Category page shows only 1 post when that post has more than 1 category?

Multiple Loops Outside the loop you can get available terms of the core taxonomy category with get_terms( ‘taxonomy_name’ ). The resulting array contains objects like object(stdClass)#141 (9) { [“term_id”] => string(1) “3” [“name”] => string(9) “The Name of your Category” [“slug”] => string(9) “name-of-tax-term” [“term_group”] => string(1) “0” [“term_taxonomy_id”] => string(1) “3” [“taxonomy”] => string(11) … Read more

Show One Level Category id

The function get_ancestors() will give you an array containing all of the parents of your category with the nearest ancestor being first in the array. So: $cid = 5; // your category ID $c = get_ancestors($cid,’category’); var_dump($c); // debugging $p = array_shift($c); // var_dump($p); // debugging Use $p to do whatever you need to do.