Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] Page Template Footer showing incorrectly (http://forum.bytesforall.com/showthread.php?t=18975)

bizkit01 Nov 26, 2012 05:31 PM

[SOLVED] Page Template Footer showing incorrectly
 
I am starting a new Page template to add thumbnails of all child pages on a page with this template. I got the thumbnails showing up properly, but the Footer on the page is left-aligned and incorrect. I looked at it and it has colspan="1" instead of the usual colspan="2". Can someone tell me why it is doing this when I'm simply using the same <?php get_footer(); ?> at the end of the template that is identical to index.php's Footer?

Full template (Work in progress):

Quote:

<?php /* Template Name: Image Thumbs Template
*/ ?>

<?php get_header(); ?>

<h1>Title</h1>

<div class="maincontent">

<?php
query_posts('posts_per_page=5&post_type=page&post_ parent='.$parent);
while (have_posts()) : the_post();
?>

<?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?>

<?php endwhile; ?>
</div>

<?php get_footer(); ?>
I can't link to the site, as it's a client's dev environment - but it simply includes <td id="footer" colspan="1"> instead of "2". A manual fix would be ok too, as I can simply hardcode it into this one page.

juggledad Nov 26, 2012 05:48 PM

disable all your plugins and see what happens

bizkit01 Nov 26, 2012 05:55 PM

Just disabled all plugins and it's the same.
I noticed it's very similar to what this guy was getting: http://forum.bytesforall.com/showthread.php?t=15624

juggledad Nov 26, 2012 06:32 PM

try starting your code with th efollowing - which is the begining lines of index.php
HTML Code:

<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
global $bfa_ata_postcount;
?>


bizkit01 Nov 26, 2012 08:41 PM

That fixed it, thanks a lot for your help as always juggledad.

bizkit01 Nov 27, 2012 01:27 AM

Can I ask a followup question about this Template?

I ended up with the Template code below, but the subpages show up in alphabetical order. Usually you could add "<?php wp_list_pages('sort_column=menu_order'); ?>", but I'm a bit lost about where to add the argument:

PHP Code:

<?php /* Template Name: Image Thumbs Template
*/ 
?>

<?php 
list($bfa_ata$cols$left_col$left_col2$right_col$right_col2$bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header(); 
extract($bfa_ata); 
global 
$bfa_ata_postcount;
?>

<?php get_header(); ?>

  <h1>Reviews</h1>

<?php $pages get_pages(array('child_of'=>164)); ?> 
  <?php foreach ($pages as $page): ?>
    <div class="reviews"><h6>
      <?php echo '<a href="' get_permalink$page->ID ) . '" title="' esc_attr$page->post_title ) . '">';
      echo 
$page->post_title;
      echo 
'</a>'?></h6>

      <?php echo '<a href="' get_permalink$page->ID ) . '" title="' esc_attr$thumbnail->post_title ) . '">';
      echo 
get_the_post_thumbnail($page->ID'thumbnail');
      echo 
'</a>'?>
    </div>
  <?php endforeach; ?>

<?php get_footer(); ?>

This is a real fun template to add a grid of subpage titles and thumbnails if anyone wants to use it.

juggledad Nov 27, 2012 06:22 AM

I would see if you could pass the sort to the get_pages() function

bizkit01 Nov 27, 2012 06:43 PM

Got it:

<?php $pages = get_pages(array('child_of'=>164, 'sort_column'=>'menu_order')); ?>

Thanks! This can be closed.


All times are GMT -6. The time now is 12:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.