Display post structure in function

Try running the post content through the do_shortcode() function before displaying it. $args = array(‘posts_per_page’ => -1,’post_type’ => ‘edge’); $edge_array = get_posts( $args ); foreach($edge_array as $e): echo do_shortcode($e->post_content); endforeach;

Show with echo if a post has two or more categories

To answer your question, if placed within the Loop – after, typically, while ( have_posts() ) : the_post(); in a single.php file – the code will work as follows: The has_category( array( ‘x’, ‘y’ ) ) condition will be satisfied if the post is in either x or y, or both, regardless of whether it … Read more

Posts not showing up on Blog page

In addition to setting a particular posts page, you have to have a theme that will accomplish your goal. Most likely your theme’s Page template, which is what is being balled by your blog Page, only outputs the content of your single Page. You can create a new Page template for this page in several … Read more

Post’s arent displaying

I just recreated your setup. I created a post-type called “supplier-showcase”. I created a taxonomy called “supplier-category”, and added a term with the slug “supplier-cakes”. Added some posts with and without the term “supplier-cakes”. Than I copied your code, inserted it in a simple page template, fixed the things I already mentioned, and reindented the … Read more

Hide post title when single post with specific category

Instead of !is_category(‘campaign-post’) I think it’s !in_category(‘campaign-post’) is_category() is used within Archives pages, when it’s in WP Query. Like your viewing a category archive page, and you’re asking: is this the category queried. in_category() (which uses has_category() which then uses has_term() which then uses is_object_in_term()) relates to single posts, asking: does this post have this … Read more

wordpress show category link instead of post link [closed]

in the loop-entry.php there is <h2><a href=”https://wordpress.stackexchange.com/questions/295028/<?php the_permalink(” ‘) ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a></h2> change above code to <h2><a href=”https://wordpress.stackexchange.com/questions/295028/<?php echo get_permalink( $post->ID ); ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a></h2> Done!