• I am re-doing my companies web site in WP.
    In the Control Panel > Settings > Reading..
    I am using a template for my front page, have that set.
    I have my Posts Page set to News (aka blog)

    The part I am having problems with is when I am on the News page.. Do I set it to a template?
    When I do that, and view the actual page, I dont see the images and stuff from the template page.

    So im not sure how to do this…? I apologize if this isnt clear. I am running MAMP so can show you right now.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Use a custom page template for your front page. And don’t call it home.php.
    For your posts page news use the (default) page.php. Or create a custom template for that. If in this template there is the_excerpt() change it to the_content()

    Thread Starter thadfiebich

    (@thadfiebich)

    ok, I have a custom page for the news (blog posts), news.php.

    In the WP control panel > pages > I have my page called news. I have it set to use the template In the News (news.php).

    When I put any content in the news WP page, it shows in the body.. but no posts.
    When I remove the content, I get the posts, but loose the body formatting from my template.

    In my template page code, do I need to identify that I want to get my blog posts? It seems to only grab my page content instead. unless I remove the content.

    Thanks!

    Moderator keesiemeijer

    (@keesiemeijer)

    Can you put the code of your news.php in the pastebin and a give a link to it

    Thread Starter thadfiebich

    (@thadfiebich)

    Im running it on a local MAP server, but code I am using is below. Thanks!

    <!-- Start the Loop. -->
     <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    <!-- Display the Title as a link to the Post's permalink. -->
     <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
    <!-- Stop The Loop (but note the "else:" - see next line). -->
     <?php endwhile; else: ?>
    
     <!-- The very first "if" tested to see if there were any Posts to -->
     <!-- display.  This "else" part tells what do if there weren't any. -->
     <p>Sorry, no posts matched your criteria.</p>
    
     <!-- REALLY stop The Loop. -->
     <?php endif; ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Static Site – Setting and Displaying Post Titles’ is closed to new replies.