Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Topics

Recent Status Updates

View All Updates

- - - - -

Content and title won't show on certain page in Wordpress

wordpress php loop

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 Mello


    CC Regular

  • Member
  • PipPipPip
  • 29 posts

Posted 05 January 2016 - 04:56 AM

I got one "front-page.php" that is a static one side page. If I use the Wordpress loop to see my latest posts at the front-page.php they all shown up.
Now I want to create a news page so I created a file "page-news.php". Removed the loop code from front-page and pasted it into page-news. Though, nothing happens. 
Loop code:
<?php get_header();?>
    if (have_posts()):
    while (have_posts()): the_post();?>
    <?php the_title();?>
    <?php the_content();?>
    else: echo '<p>no posts were found</p>';
    <?php get_footer();?>
What have I missed?


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download