Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 06:40 PM.


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