ThemeShaper Forums » Thematic

[closed]

Displaying custom post types on child theme home page?

(2 posts)
  • Started 2 years ago by maren.m
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. maren.m
    Member

    Just started working with custom post types in a new Child Theme. I've successfully registered a new one, and everything's working fine...but I can't get it to show up on the home page.
    Do I need to write a new query? How do I replace the standard one on index.php? Do I need to create a new index.php file?
    Sorry if this is a dumb question..

    Thanks so much!!

    Posted 2 years ago #
  2. you could try this:
    http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page

    or you could merge some query args like they show in the codex
    http://codex.wordpress.org/Function_Reference/query_posts

    and put in on the thematic_above_indexloop hook

    function kia_adjust_args(){
    global $wp_query;
    $args = array_merge( $wp_query->query, array( 'post_type' => 'product' ) );
    query_posts( $args );
    }
    add_action('thematic_above_indexloop','kia_adjust_args');

    in place of 'product' use the name of your CPT

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.