• Resolved TonyaOD

    (@tonyaod)


    Hi

    I am converting a converting a customers site to WordPress because they want a blog but also want a CMS. I have created successfully a theme that shows their header footer menu etc. I even have the pages showing the content (though quite how I managed that I dont know). Now I want a separate page that is their actual blogs. I know there are posts & the default home page shows them but only shows the actual text nothing else

    This is what I have on the index.php

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
    the_content();
    endwhile; else: ?>
    <p>Sorry, no posts matched your criteria.</p>
    <?php endif; ?>

    How do I create a separate blog page & get it to show the posts & the blog sidebar of archive links etc – it seems almost like I need a separate template page for this ??? Ah Ok I am lost !!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Look at the dashboard, settings, readings. You can select what page opens first. You do not have to change any files.

    Thread Starter TonyaOD

    (@tonyaod)

    I have set my home page as my first static page and added a link to a blog page (busy reading google & other forum posts ) Now have posts showing but no forward next buttons etc & no posting box

    do I post another question about these ?

    Hi TonyaOD,

    If I am not wrong are you looking for this kind of page.
    http://www.abode-valley-avoa.org/blog-spot/

    This page is a separate blog page used to display all the posts at one page with excerpt. For this you will need to create a custom page template. you can create something like this:

    <?
    /* Template Name: Blog Page Template */
    
    ?>
    
    <?php
    /**
     * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    
    get_header(); ?>
    
    		<div id="container">
    			<div id="content" role="main">
    
    			<?php
    			/* Run the loop to output the page.
    			 * If you want to overload this in a child theme then include a file
    			 * called loop-page.php and that will be used instead.
    			 */
    			get_template_part( 'loop', 'page' );
    			?>
    
    			<div id="allevents" class="bloglatestposts">
    			<?php if (function_exists('yg_recentposts')) { ?>
    			  <ul>
    			    <?php
    				$parameters = array(
    			    'limit' => 20, //Number of posts to show
    			    'excerpt' => 200,  //excerpt length (letters)
    			    'afterexcerpt' => '...',
    				'afterexcerptlink' => 1,
    				'separator' => '<br /><br />',
    			    'actcat' => false, //get posts current category
    			    'cats' => '12,13,14,15,16,17',  //Categories to get posts
    			    'cusfield' => 'thumbnail', //custom field name of thumbnail image
    			    'w' => 110,  //width
    			    'h' => 110, //height
    			    'firstimage' => true,  //get first image of post content
    				'showauthor' => 1,
    				'showtime' => 1,
    				'format' => 'M d,Y',
    				'spot' => 'spot2',
    			 	'atimage' => false,  //get first attached image of post
    			    'defimage' => 'http://localhost/abode/wp-content/uploads/2012/04/calendar.png', //default thumbnail image
    			    );
    			     yg_recentposts($parameters);
    			   ?>
    			  </ul>
    			<?php } ?>
    			</div>
    
    			</div><!-- #content -->
    
    		</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    @HRanjan: That won’t work. Its theme-specific and contains references to custom function.

    @tonyaod: Have you tried switching to the Twenty Eleven theme to rule out any theme-specific problems? How many posts-per-page have you configured in Settings -> Reading? How many posts have you published?

    Thread Starter TonyaOD

    (@tonyaod)

    thanks for the heads up. I looked for some help on creating a template & worked through it until i had what i wanted
    link to easy adaptable wordpress loop template tutorial

    this was great – i added a few extras like category filter but it now works fine

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Help with static blog page’ is closed to new replies.