1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

WordPress Site; Blog Page Showing Home Rather Than Posts

Discussion in 'HTML & Website Design' started by shteca, May 13, 2013.

  1. #1
    Hi
    I have got a custom theme for WordPress, I have set this page (http://www.cadagency.co.uk/current-cad-vacancies/) as my blog page.
    I want it to show all my posts but instead its showing "Home" with the exert from the homepage.

    Here is my full code from blog.php;

    <?php
    /*
        Template Name: Blog
    */
    ?>
     
    <?php get_header(); ?>
     
    <div id="casing">
     
    <div class="incasing">
     
    <div class="topbar">
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    </div>
     
    <div id="content">
     
    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query('paged='.$paged);
    ?>
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>   
     
    <div class="post" id="post-<?php the_ID(); ?>">
     
    <div class="title">
        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    </div>
    <div class="postmeta">
        <span class="author">Posted by <?php the_author(); ?> </span> <span class="clock">  <?php the_time('M - j - Y'); ?></span> <span class="comm"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments'); ?></span>
    </div>
     
    <div class="entry">
     
    <?php
    if ( has_post_thumbnail() ) { ?>
        <a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=200&amp;w=470&amp;zc=1" alt=""/></a>
     
       
       
       
       
       
       
    <?php } ?>
    <?php the_excerpt(); ?>
    <div class="clear"></div>
    </div>
     
    </div>
     
    <?php endwhile; ?>
     
    <div class="clear"></div>
     
    <?php getpagenavi(); ?>
     
    <?php $wp_query = null; $wp_query = $temp;?>
       
    </div>
     
    <?php get_sidebar(); ?>
    <div class="clear"></div>
     
    </div>
     
    <div class="clear"></div>
    </div>   
     
     
     
    <?php get_footer(); ?>
    Code (markup):
    Can anyone work this out?
     
    shteca, May 13, 2013 IP
  2. Zarko Dimitrov

    Zarko Dimitrov Greenhorn

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Not sure how you have this set-up but this might help you out :
    http://www.tastyplacement.com/wordpress-tutorial-display-all-posts-on-a-page
     
    Zarko Dimitrov, May 14, 2013 IP
  3. dneff

    dneff Greenhorn

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    Hi, did you set a static home page? If not then it will still be putting blog posts on home page.
     
    dneff, May 14, 2013 IP
  4. awakebutnapping

    awakebutnapping Active Member

    Messages:
    619
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    78
    #4
    Do you want it to show excerpts of all your posts or the entire content of the post(s) instead of the excerpt?

    If you want it to show the entire post, then change:
    <?php the_excerpt(); ?>
    to
    <?php the_content(); ?>
     
    awakebutnapping, May 14, 2013 IP