Hi I am newbie in wordpress theme development & working on a wordpress theme. I have 2 types of posts, i.e. default & news. I have a page called page_news.php where I am listing all news from news posttype. There is another page called page_news-details.php which will be detail page for each news item. The problem is how to link the two so that when I click on a news item from my news listing page, it should take me to page_news-details.php. What values I will pass & get in these 2 pages? Also confused that the news details is using page.php or single.php ? Regards
absolutely it's using single.php. Take TwentyTwelve as example - In single.php, find <?php get_template_part( 'content', get_post_format() ); ?> PHP: and change it to <?php get_template_part( 'content', get_post_type() ); ?> PHP: Then if the post type is news, the details page will use content-news.php. If this file doesn't exist, it will use content.php. Above is just a hint. Hope it helps.