brianholcombe
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: My page template isn’t pulling the loopUpdated:
I’ve changed the template code and have hidden the date and time, but still no loop. The code is copied from my index.php template, which displays the loop on the homepage, yet no loop on the blogcenter page.<?php /* Template Name: blogcenter */ ?> <?php /* get all options: */ include (TEMPLATEPATH . '/functions/bfa_get_options.php'); get_header(); ?> <img src="http://themountainshop.com/wp-content/uploads/2009/10/blogcenter.header.png"> <?php /* If there are any posts: */ if (have_posts()) : $bfa_ata['postcount'] == 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?> <?php /* This outputs the next/previous post or page navigation. This can be edited at Atahualpa Theme Options -> Style & edit the Center column */ bfa_center_content($bfa_ata['content_above_loop']); ?> <?php /* The LOOP starts here. Do this for all posts: */ while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?> <?php /* Add Odd or Even post class so post containers can get alternating CSS style (optional) */ $odd_or_even = (($bfa_ata['postcount'] % 2) ? 'odd-post' : 'even-post' ); ?> <?php /* This is the actual WordPress LOOP. The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */ bfa_center_content($bfa_ata['content_inside_loop']); ?> <?php /* END of the LOOP */ endwhile; ?> <?php /* This outputs the next/previous post or page navigation and the comment template. This can be edited at Atahualpa Theme Options -> Style & edit the Center column */ bfa_center_content($bfa_ata['content_below_loop']); ?> <?php /* END of: If there are any posts */ else : /* If there are no posts: */ ?> <?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page. This can be edited at Atahualpa Theme Options -> Style & edit the Center column */ bfa_center_content($bfa_ata['content_not_found']); ?> <?php endif; /* END of: If there are no posts */ ?> <?php bfa_center_content($bfa_ata['center_content_bottom']); ?> <?php get_footer(); ?>Brian
Forum: Fixing WordPress
In reply to: Add full loop to a page in AtahualpaOK, so back to this issue. I am able to activate a new template, but cannot for the life of me pull the loop into a page other than the post page within Atahualpa.
Below is the code for the template in questions:
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540 {\fonttbl\f0\fmodern\fcharset0 Courier;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww12460\viewh11980\viewkind0 \deftab720 \pard\pardeftab720\ql\qnatural \f0\fs24 \cf0 <?php\ /*\ Template Name: blogcentertemplate\ */\ ?>\ <?php /* get all options: */ include (TEMPLATEPATH . '/functions/bfa_get_options.php'); get_header(); ?> <?php bfa_center_content($bfa_ata['center_content_bottom']); ?> <!...Begin Loop...!> <?php if(have_posts()) : while(have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php the_title('<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', '</a></h2>'); ?> <p class="byline"> <span class="author vcard"><?php the_author_posts_link(); ?></span> <span class="sep">|</span> <abbr class="published" title="<?php the_time(__('l, F jS, Y, g:i a', 'example')); ?>"><?php the_time(__('F j, Y', 'example')); ?></abbr> <?php edit_post_link(__('Edit', 'example'), ' <span class="sep">|</span> <span class="edit">', '</span> '); ?> </p> <div class="entry-content"> <?php the_content(__('Continue reading', 'example')); ?> <?php wp_link_pages('before=<p class="pages">' . __('Pages:','example') . '&after=</p>'); ?> </div> <p class="entry-meta"> <span class="categories"><?php _e('Posted in', 'example'); ?> <?php the_category(', '); ?></span> <?php the_tags('<span class="tags"> <span class="sep">|</span> ' . __('Tagged', 'example') . ' ', ', ', '</span>'); ?> <span class="sep">|</span> <?php comments_popup_link(__('Leave a response', 'example'), __('1 Response', 'example'), __('% Responses', 'example'), 'comments-link', __('Comments closed', 'example')); ?> </p> </div> <?php endwhile; ?> <?php else : ?> <p class="no-posts"><?php _e('Sorry, no posts matched your criteria', 'example'); ?></p> <?php endif; ?> <?php get_footer(); ?>If anyone could help, I would be incredibly grateful.
Brian
Forum: Themes and Templates
In reply to: Excerpt of most recent post on static home pageAre you including this script in your index.php file? When I plug it in there, I get a Syntax error when the page loads.
Thanks,
BrianForum: Themes and Templates
In reply to: Atahualpa – Adding Custom Page Template?Nevermind – question answered.
Cheers,
BrianForum: Fixing WordPress
In reply to: Add full loop to a page in AtahualpaI haven’t yet. I thought I’d post here for affirmation before going the template route.
Brian