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 » Montezuma Theme »

Managing content display on the main page of the site


 
Prev Previous Post   Next Post Next
  #1  
Old Aug 7, 2013, 07:30 AM
mobilechad
 
15 posts · Apr 2013
Managing content display on the main page of the site

I'm trying to get my content set up such that the latest post always shows the full content, and the later ones only show excerpts. I've updated postformat.php with a loop as follows:

...
<div class="post-bodycopy cf">

<div class="post-date">
<p class="post-month"><?php the_time( 'M' ); ?></p>
<p class="post-day"><?php the_time( 'j' ); ?></p>
<p class="post-year"><?php the_time( 'Y' ); ?></p>
</div>

<?php if (have_posts()) : $count = 0;
while (have_posts());
$count++;

if ($count == 1) : the_content();

else : the_excerpt();

endif;
endwhile;
endif;
?>

</div>

...

The problem here is that:
1. It's echo'ing some of the code to be rendered in the browser (count++, count ==)
2. It doesn't seem to work as expected - it renders the content in 3 sections for each post with multiple duplicate sharing buttons.

It's the standard mullet loop taken from this site:
http://perishablepress.com/easily-ad...oop-templates/

I'm kind of at a dead-end with it - I've tried a bunch of different formatting things, like having each line of code individually start with <?php and end with ?>, but that functioned 100% the same as the above.

Is there someplace else I should be writing this code, or something with Montezuma that would prevent it from working?

I'm new to Wordpress/PHP - so apologies if this is a basic error. Thanks in advance for any help.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
PAGE NOT FOUND while managing plugins ronakonly Plugins & Atahualpa 1 Jan 16, 2011 04:47 AM
Content not showing on main page freedomrains Center area post/pages 11 Apr 27, 2010 05:03 AM
Static page will not display content siefert Center area post/pages 9 Jan 22, 2010 10:32 AM
Front Page - Main content code murdoco Header configuration & styling 1 Jun 30, 2009 05:56 AM
managing ftp site - maybe not in windows? help qldfilmlocations Header configuration & styling 1 May 13, 2009 06:40 PM


All times are GMT -6. The time now is 10:09 PM.


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