Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

Page Navigation and Comments not showing with Code


  #1  
Old Jan 17, 2010, 09:45 PM
sleizure
 
13 posts · May 2009
Page Navigation and Comments not showing with Code

Hello, I've gone against the grain, and have a static Homepage configured showing recent posts, and gallery photos. I have my Journal Link located at http://www.tiredofit.ca/journal/

I am loading Journal.php via the template function with the following code

PHP Code:
<?php
/*
Template Name: Journal
*/
?> 
<?php // get all options:
include (TEMPLATEPATH '/functions/bfa_get_options.php');

get_header(); ?>
    <?php // Displayed on MULTI post pages if activated at Theme Options -> Next/Previous Navigation:
    
bfa_next_previous_page_links('Top'); // To edit the output, see functions/bfa_next_previous_links.php ?>

<?php
//detect a set series of posts per page
$ppp get_option('posts_per_page');
 
// initial page fourteen posts
if (!is_paged()) {
    
$posts get_posts('numberposts=1&cat=-23&order=DESC&orderby=date');
// second page with offset
} elseif($paged == 2) {
    
$posts get_posts('offset=5');
// all alternative pages with settings from backend
} else {
    
$offset $ppp*($paged-2)+5;
    
$posts get_posts('offset='.$offset);
}
 
if(
$posts) :
    foreach (
$posts as $post) :
     
setup_postdata($post);
                
next_post_link();
     
?>

      <div>

<font size="4.2pt"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"> <?php the_title(); ?></a></font> &nbsp;&nbsp;&nbsp;   <font size="0.2pt" text-align="right"><?php the_date(); ?> <?php the_time(); ?>-  <?php the_author(); ?></font></p> 
 <?php the_content(); ?>

  </div>

 <?php endforeach;
 endif 
?></td>
 
 <?php // Displayed on MULTI post pages if activated at Theme Options -> Next/Previous Navigation:
    
bfa_next_previous_page_links('Bottom'); // To edit the output, see functions/bfa_next_previous_links.php ?>

            <?php // Load Comments template (on single post pages, and "Page" pages, if set on options page)
        
bfa_get_comments(); // To edit the output, see functions/bfa_post_parts.php ?>


 <?php get_footer(); ?>
Which works fine, showing the last post without issue, but does not show page navigation or the comments. I have just upgraded to 3.45 to see if I could get it working but it still doesn't. On a logistics / navigation end its a nightmare as my users are looking for the back and forth links. How would I add this back in, or am I just being overly complicated with trying to show my latest post?
  #2  
Old Jan 18, 2010, 12:33 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
The link to your site isn't working for me. And yes you may indeed be going about this in a more complicated than necessary manner. What exactly do you want to show up on your home page or journal page?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Jan 18, 2010, 01:58 PM
sleizure
 
13 posts · May 2009
Sorry - we had some hosting issues this morning.

I have my Wordpress Configuration to point to "Home" For the Front Page, and for the Posts page to point to "Dummy Page Do Not Delete" - That no one will ever visit. the reason why I do this, is if I set it to a Static Page such as "Journal" - It shows the contents of the home.php file as well.

I have my homepage functioning as per normal, but the Journal Link, I simply want it to show the latest post, with navigation arrows, and the comment form. At present it does not work.

Does this make a bit more sense?
  #4  
Old Jan 18, 2010, 02:38 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I'm still not clear on why you can't set WordPress to a static home page and a static Journal page for blog posts. What items show up on the blog/journal page that you don't want. It should just display posts.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #5  
Old Jan 18, 2010, 02:41 PM
sleizure
 
13 posts · May 2009
Here is the contents of my home page: It's ugly and I have to hand edit the front of it. If I set the "posts" page to "Journal" it shows the home page again.

PHP Code:
<?php
/*
Template Name: Homepage
*/
?> 

<?php // get all options:
include (TEMPLATEPATH '/functions/bfa_get_options.php');
get_header(); ?>

<a class="flickr-image alignleft" rel="flickr-mgr" href="http://www.flickr.com/photos/40600878@N08/3926056351/"><img class="flickr-small" src="http://farm4.static.flickr.com/3476/3926056351_ecb5698bb6_s.jpg" alt="" /></a>

<BR>Hello! This is the website of a Canadian documenting his travels around the world while riding a bicycle. Within these pages you will also find equipment reviews of components, packing lists and other resources to aid other people wishing to embark on long term bicycle touring journeys. <BR> <P>
&nbsp;<br>
<CENTER><B>I'm currently planning <a href="http://www.tiredofit.ca/phase-3">Phase-3</a> taking me from Vancouver BC, Canada all the way to St. Johns Newfoundland, Canada! </B><P>

 <p style="text-align: center;"></p>
<CENTER>
<table style="width: 85%;" border="0">
<tbody>
<tr>
<td style="text-align: center; width: 380px;"><span style="text-decoration: underline;"><h3><A HREF="http://www.tiredofit.ca/stats/">Where am I?</A></h3></span></td>
<?php
global $post;
$latest_posts get_posts('numberposts=1');
foreach(
$latest_posts as $latest) {
echo 
'<td style="text-align: center; width: 380px;"><span style="text-decoration: underline;"><h3><a href="'.get_permalink($latest->ID).'">Latest Post</a></span></td></tr>';
}
?>
</tr>
<tr>
<td style="text-align: center; width: 380px;">
<CENTER><?php echo GeoMashup::map('height=240&width=340&zoom=10&add_overview_control=false&add_map_type_control=false&map_content=single'); ?></CENTER>
       
 </td>
<td style="text-align: left;">  <?php
 $postslist 
get_posts('numberposts=1&order=DESC&orderby=date');
 foreach (
$postslist as $post) : 
    
setup_postdata($post);
 
?> 
 <div>
<CENTER><font size="4.2pt"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"> <?php the_title(); ?></a></font> &nbsp;&nbsp;&nbsp;  <br> <font size="0.2pt" text-align="right"><?php the_date(); ?> <?php the_time(); ?> -  <?php the_author(); ?></font></p> </CENTER>
 <?php the_excerpt(); ?>
 <p style="text-align: right;"><a href="<?php the_permalink(); ?>" title="Click to read more">--more--</A></p>
 </div>
 <?php endforeach; ?></td>
</tr>
<tr>
<td style="text-align: center; width: 380px;"><span style="text-decoration: underline;"><h3><A HREF="http://www.tiredofit.ca/recentphotos/">Recent Images</A></h3></span></td>

<td style="text-align: center; width: 380px;"><span style="text-decoration: underline;"><h3><A HREF="http://www.tiredofit.ca/journal/">Recent Posts</A></h3></span></td>


<tr>
<td style="text-align: center;">
<CENTER><?php echo $falbum->show_recent(12,1,'s','');?></CENTER>
 
 </td>
 
<td style="text-align: left;">
     <ul>
    <?php query_posts('showposts=12'); ?>

    <?php while (have_posts()) : the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - <?php the_date(); ?></li>

    <?php endwhile;?>
    </ul>
</td>
     
 </tr>

</tbody></table>

</CENTER>

<?php get_footer(); ?>
  #6  
Old Jan 18, 2010, 02:53 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I'm not a coding/php guru so I'm not sure what to tell you. I would probably have just put a table on the home page and used shortcodes and/or code snippets to generate something similar to what you have.

Maybe someone else that knows php can jump into this thread.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Jan 18, 2010, 03:55 PM
sleizure
 
13 posts · May 2009
Thanks for trying I tried to do the shortcode thing but it failed miserably.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing Logo Next To Page Menu Navigation? mannitol Page & Category Menu Bars 6 Jul 28, 2011 10:43 AM
Header Drop Down Navigation (Where to insert the code) rockport Header configuration & styling 7 Nov 15, 2010 07:57 PM
[SOLVED] Atahualpa options code not showing bushtool New Versions, & Updating 13 Oct 22, 2009 01:01 PM
Inline Comments - I have code, but the comments aren't displaying thekaitlin Comments, trackbacks & pings 0 Jul 29, 2009 02:28 PM
Archives not working, comments not showing and a page question ! aliferste Comments, trackbacks & pings 8 Dec 14, 2008 03:16 AM


All times are GMT -6. The time now is 03:44 AM.


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