Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This post may already exists but I just missed it in how I searched for it. Here goes. I have recently changed my blog back to the Genesis Framework. I am using the Nameless child theme.

These are my issues:

  1. The only way the front page shows up correctly is for me to select "Show latest posts" in the Settings---->Reading section
  2. Only my posts are showing up and not those of the other authors. I created a page called "Blog" and entered the code below, but it still only shows my posts.

My template file:

<?php
/*
Template Name: Blog
*/
get_header();

$args = array(
    'post_type' => 'any', #all post types
    'posts_per_page' => 10 #get 10 posts
);
$query = new WP_Query( $args );
if($query->have_posts()):
  while($query->have_posts()):
    $query->the_post();
    the_title(); #display the title
  endwhile;
endif;

get_footer();

In the author box I see where different authors can be chosen by the post, but I need all posts by all authors showing up in the listing. Any help would be greatly appreciated.

Here is a link to my site, if that helps: http://fullfigureplus.com

share|improve this question
    
I'm a bit confused from your description: are you displaying your blog posts index on the site front page, or on a static page? What are your settings for Front page displays, and, if applicable, Front page and Posts page? –  Chip Bennett Aug 21 '13 at 15:36
    
I guess they would be on a static page, but I am not sure. My settings are Front page displays---->your latest posts. –  Glen Johnson Aug 21 '13 at 15:43
    
If Front page displays is set to your latest posts, then your blog posts index is being displayed on the site front page. Do all posts show up there? –  Chip Bennett Aug 21 '13 at 15:51
    
No they do not. They show up based on the widget settings for the child theme. I have a link at the top of the page titles "latest blog posts" that is linked to a page I created called "Blog" The problem is it only shows posts from 10 days ago and only shows my posts not the other author. –  Glen Johnson Aug 21 '13 at 16:05
    
Your "blog" template won't factor in here. WordPress simply won't use it to display your blog posts index. WordPress will only use home.php or index.php (unless on the site front page, in which case WordPress will first try to use front-page.php). –  Chip Bennett Aug 21 '13 at 17:12

1 Answer 1

  1. The only way the front page shows up correctly is for me to select "Show latest posts" in the Settings---->Reading section

That is the default way most Genesis child themes work and there is nothing in the Nameless theme code that suggests the theme author expected anyone to use a static front page. Genesis was not knowingly designed that way, but all pre-Genesis StudioPress themes required the "Show latest post" setting to run properly.

I recall doing a few tests for static pages (Geneis Breadcrumbs comes to mind.) during Genesis testing, but Brian never uses static pages for his child themes. So, expect the same problems all WordPress static pages have (like pagination problems).

  1. Only my posts are showing up and not those of the other authors. I created a page called "Blog" and entered the code below, but it still only shows my posts.

Genesis already has Blog page template and a looks for a custom field named query_args for WP_Query loop settings. There are also settings for the Genesis Theme Settings page. The query_args custom field overrides the Theeme Settings page settings.

  • Delete the Blog page template file in the child theme.
  • Edit your blog page.
  • Add a custom field name query_args.
  • Set the value to post_type=any. The number of posts per page are set in the Genesis Theme Settings page.
  • Go to the Genesis Theme Setings page (/wp-admin/admin.php?page=genesis) and set the Blog Page Template settings.

That will do the same thing as your code and will call all the extra Genesis page stuff as well. Note: query_args can only accept WP_Query string parameters. More complicated queries may be added using the 'genesis_custom_loop_args' filter.

share|improve this answer
    
I was reading the beginners guide to Genesis and it walked me through what to do. It was only displaying the posts from one category. I feel silly missing such an obvious fix. Thanks for your help. –  Glen Johnson Aug 22 '13 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.