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

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


  #1  
Old Aug 26, 2009, 01:56 AM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
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, 05: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, 06: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, 06:36 PM
juggledad's Avatar
juggledad
 
23,655 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, 06: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, 07:14 PM
juggledad's Avatar
juggledad
 
23,655 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, 09: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')
  #8  
Old Aug 27, 2009, 10:24 PM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
Success! Hooray!

For future reference (and crossposting to the original thread), here is the successful code:

<?php if ( is_home() ) { ?>
<?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>'); ?>

Thank you both so much! Another donation is winging its way to you for your excellent support of this brilliant theme.

Mary
  #9  
Old Aug 27, 2009, 10:56 PM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
Wait a minute ... spoke too soon. One additional issue. Headers are now showing on the "Journal" page, but when you click on a permalink for the actual post (e.g. http://www.demimonde.com/2009/08/27/...r-bfa/#respond) the page header doesn't show up there.

Thoughts?
  #10  
Old Aug 28, 2009, 05:49 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
So you want headlines on this particular single post page, or on all single post pages? You mentioned that you want headlines only on the Journal page.

Single post pages are is_single()

<?php if ( is_home() OR is_single('hooray-hooray-for-bfa') ) { ?>
<?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>'); ?>

or, for all single post pages

<?php if ( is_home() OR is_single() ) { ?>
<?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>'); ?>
  #11  
Old Aug 28, 2009, 06:05 AM
mkhobson
 
26 posts · Aug 2009
Oregon City, OR
Hi Flynn:

Your way is easier and more elegant than what I figured out, which was this:

<?php if ( !is_page(array('Home', 'About', 'Biography', 'Bibliography', 'Appearances', 'Novels', 'The Native Star', 'The Desired Poison', 'Stories', 'The Hotel Astarte', 'Domovoi', 'Hell Notes', 'Podcasts', 'Articles', 'Press', 'Interviews', 'Press Kit', 'Contact' )) ) { ?>
<?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>'); ?>

... But both ways work. I think I'll go with your way, though. ;-)

Thank you again!

Mary
  #12  
Old Sep 7, 2009, 11:09 AM
TwtrCoach
 
22 posts · Jun 2009
Tupelo, MS
Not sure if I need to add this in again.

Added it in once. Then it looked like there was options under the pages to adjust your settings. So I took it out again. Now I removed all my headers. Tried to reinstall ver 3.4.2 again. But nope. So is back to 3.3.3 again.. Did only want headers for pages turned off, not all my headers.

Well, I try again later on..

Cheers.. Are

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 10:33 AM
[SOLVED] How to hide page titles on the home page Tim F Post-Kicker, -Byline & -Footer 1 Aug 22, 2009 04:18 AM
Page Titles jtotally New Versions, & Updating 4 Jun 27, 2009 11:30 AM
removing titles on each page nickcee Atahualpa 3 Wordpress theme 4 Jun 11, 2009 09:14 AM
Take Page Titles and Widget Titles for example... bseppa Sidebars & Widgets 0 Dec 12, 2008 07:44 PM


All times are GMT -6. The time now is 09:42 AM.


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