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 Marketplace » Customization, Design, Programming... »

Help me figure out how to turn off page titles on one page only


  #1  
Old Aug 26, 2009, 02:56 AM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
Help me figure out how to turn off page titles on one page only

Meet my blog:
www.demimonde.com/blog

The Problem To Be Solved:
I want page titles to appear on only ONE page of the whole blog--the page called "Journal", which is page_id '48'. On all other pages, there should be no titles.

Background Information:

According to http://forum.bytesforall.com/showthread.php?t=1334, accomplishing this seemed to be easy in versions prior to 3.4.1. Several commenters (from about post 21 on) asked how to solve this problem in 3.4.1, and no one has come up with any answers. The key to solving the problem seems to be in Appearance>Atahualpa Theme Options>"Style & Edit Column" tab. In the "The Loop" box, commenting out the "bfa_post_headline" function results in all the headlines being turned off sitewide. So far so good. However, nothing else I've tried to implement an "if/else" solution (so that page 48, and ONLY page 48 has titles turned on) has worked. Here is the code I cobbled together:

<?php if ( is_page('48') ) { ?>
<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php } else { ?>
<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php } ?>

I'm wondering if the solution will have to go all the way down to an edit of the bfa_post_parts.php file, where the post_header function is defined, but given that my PHP skills are lousy, I'd need help with that.

So. Any takers? How much?
  #2  
Old Aug 27, 2009, 06:51 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The else part is not needed, try

<?php if ( is_page('48') ) { ?>
<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php } ?>
<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>

Make sure you're using the right page ID, and that you aren't seeing cached pages (Wp Cache, Browser cache, etc)
  #3  
Old Aug 27, 2009, 07:10 PM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
Hi Flynn:

Still no luck, even with the new code. I tried 3 different variables: 'journal', 'Journal', and '48'

I'm clearing the browser cache between each refresh using Firefox's "Clean Sweep" button.

Thanks,
Mary
  #4  
Old Aug 27, 2009, 07:36 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
is the journal page set as the 'blog' page in wordpress dashboard->settings->reading?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Aug 27, 2009, 07:40 PM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
Yes. The site has a static home page (Home) and the posts page is Journal.

Thanks,
Mary
  #6  
Old Aug 27, 2009, 08:14 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
When the dashboard->settings->reading->Front page displays->A static page (select below) is checked and the 'Posts page:' points at a page (let's call it 'Journal'), the '<body' in the source looks like this
HTML Code:
<body class="blog logged-in">
and is_page() returns null

BUT

when the dashboard->settings->reading->Front page displays->Your latest posts is checked and you go to the page 'Journal', the '<body...>' looks like this
HTML Code:
<body class="page page-id-80 page-template page-template-default logged-in">
is_page() returns 1

Is this a wordpress bug??
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Aug 27, 2009, 10:03 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
That's possible, good find. Or it may be intended that way.

@Mary: So, if this is the blog posts home page, try with is_home() instead of is_page('something')

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Page titles in single pages with out removing post titles robertbrand Atahualpa 3 Wordpress theme 7 Jun 21, 2011 11:33 AM
[SOLVED] How to hide page titles on the home page Tim F Post-Kicker, -Byline & -Footer 1 Aug 22, 2009 05:18 AM
Page Titles jtotally New Versions, & Updating 4 Jun 27, 2009 12:30 PM
removing titles on each page nickcee Atahualpa 3 Wordpress theme 4 Jun 11, 2009 10:14 AM
Take Page Titles and Widget Titles for example... bseppa Sidebars & Widgets 0 Dec 12, 2008 08:44 PM


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


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