Display on page every post in blog WITH comments

Short answer: Add comments_template(); under your the_content(). But there’s a better way to do this that will carry over any formatting and style you have on your main blog. Maybe you don’t want this, though, so ignore the rest if needed. Here’s the improved loop code: $args = array( ‘numberposts’ => -1); $query = new … Read more

Some doubts about how the loop work (trying debugging it)

<?php if (have_posts()) : while (have_posts()) : the_post(); endwhile; else: _e(‘No blog found.’, ‘polymer’); endif; ?> if(have_post) condition is to check if the page contain post, while(have_posts) condition if there is more than one post display in loop, the_post() is used to display the post if(have_post) condition fails it will go to else loop. Tell … Read more

Would a “hub” page work better as a page or a post?

For things like that a page is better option, because you can make use of custom page templates and also because pages are a better place for inner secondary queries. As example, if you want to use pagination for secondary queries, alongside next_posts_link() and previous_posts_link(), both those functions check if ( ! is_single() ) to … Read more

Change Author Name to Sitename on Frontend

You could modify it through the the_author filter: /** * Set the author name as the site title. */ ! is_admin() && add_filter( ‘the_author’, function( $author ) { return get_bloginfo( ‘name’ ); } ); where we change the author name to the site name on the frontend with the help of the get_bloginfo() function.

Post title is not showing

This part <div class=”publish_date”>Post Date: <?php the_time(‘F jS, Y’);?> By <?php the_author_posts_link(); ?><?php _e( ‘ Posted in’ ); ?> <?php the_category( ‘, ‘ ); ?>· Tags: <a href=”#”>CSS</a> · <a href=”#”>Web Design</a> · <a href=”#”>Full Story</a></div> </div> should be inside the loop (just above or below your call to the_content();), not outside For further info … Read more

Get postlist for each category using query_posts?

Your use of queries is completely wrong, and as stated before, query_posts should never be used. The method you are using to retrieve you category ID’s are also a waste of resources. It would save much more if you knew the ID’s. I would also look at get_categories to retrieve my category details and passing … Read more

wp_insert_post not working fine

As Joshua suggested in his comment, your code isn’t escaped properly. Just before “See Original Article” (in both snippets) you have target=”_blank” on your links with single quotes. Replace that with double quotes target=”_blank”