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 »

[SOLVED] Display page title at top of center column


  #1  
Old Feb 9, 2011, 08:11 PM
jbrown13
 
10 posts · Feb 2011
Greetings...

My site is http://cslgc.org, and I'm using Atahualpa 3.5.2 (yes, I'll upgrade soon). The home page is set to a static page, and the blog entries are displayed on a page titled "CSL Blog"; its slug is "csl-blog". I want to display the title of this page at the top of the center column.

I've tried adding

Code:
<?php if ( is_page('CSL Blog') ) {echo 'CSL Blog' ; } ?>
to ATO > Style and edit CENTER COLUMN > Content ABOVE the LOOP. Nothing displays.

What have I done wrong, please?

Thanks...

JGB
  #2  
Old Feb 10, 2011, 06:16 AM
jbrown13
 
10 posts · Feb 2011
Okay, I've done some experimenting, and the problem is a little more specific now. I tried this same trick for a different page, adding the following code in ATO > Style and edit CENTER COLUMN > Content ABOVE the LOOP:

Code:
<?php if ( is_page('Directions') ) {echo "#" ; } ?>
This displays a hash mark at the top of the center column of my Directions page.

The problem thus seems limited to my posts page. Something in the way that page is handled overrides any changes I make to the pre-loop code.

How can I display a title at the top of the center column of my posts page?

Thanks...

JGB
  #3  
Old Feb 10, 2011, 06:43 AM
jbrown13
 
10 posts · Feb 2011
Ha! Solved it.

Per the Wordpress Codex entry on Conditional Tags:
Quote:
is_home() : When the main blog page is being displayed. This is the page which shows the time based blog content of your site, so if you've set a static Page for the Front Page (see below), then this will only be true on the Page which you set as the "Posts page" in Administration > Settings > Reading.
Therefore, the code to put in ATO > Style and edit CENTER COLUMN > Content ABOVE the LOOP is

Code:
<?php if ( is_home() ) {echo '<div class="post-headline"><h1>CSL Blog</h1></div>' ; } ?>
And it works.

JGB

Bookmarks

Tags
center column, is_page, loop, php



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Forgive Me: White Space at Top of Center Column Lone Prairie Center area post/pages 2 Sep 23, 2010 01:00 PM
delete page title/name from top of center section wppg Center area post/pages 6 Aug 11, 2010 03:04 PM
[SOLVED] Is It Possible To Remove all the space at the top of the center column? scombridae1969 Center area post/pages 3 Aug 8, 2010 04:49 PM
Posts don't display in center column DUhlig Atahualpa 3 Wordpress theme 3 Aug 14, 2009 04:52 AM


All times are GMT -6. The time now is 12:30 PM.


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