Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] How to suppress Header from appearing on certain categories? (http://forum.bytesforall.com/showthread.php?t=7423)

blogmom Jun 3, 2010 05:02 PM

[SOLVED] How to suppress Header from appearing on certain categories?
 
Hi all,

On my site, I have a page that lists posts from a certain category. My hyperlinks to these posts use "rel=shadowbox" to display the Post in a popup Shadowbox JS - but it looks weird to have the Header,Kicker,Category Bar and Page Bar appearing in these popups, so I'm trying to suppress it. In other words, I'm basically trying to suppress Header,Kicker, and bars for certain categories. To do this, I think I need to add logic to the code seen in Center Column -> Style & edit Center Column -> "The Loop", something like "if Category=XX or YY, then do not process <?php bfa_post_kicker, <?php bfa_post_headline, etc. I have tried hacking around with <?php IF statements based on other posts in this support forum, but I can't get it working.

Anyone interested in helping me figure this out?

I use Atahualpa 3.4.9

Thanks all...

blogmom Jun 3, 2010 09:45 PM

I figured it out!!! It's not the Center area that I need to edit after all. It's header.php.

Where it says:
Code:

<!-- Header -->
<td id="header" colspan="<?php echo $cols; ?>">

          <?php bfa_header_config($bfa_ata['configure_header']); ?>

I changed to
Code:

<!-- Header -->
<td id="header" colspan="<?php echo $cols; ?>">
<?php if (!in_category('3') ) {
          bfa_header_config($bfa_ata['configure_header']); } ?>

So easy!! Now I'll play with creating a "thin header", one without an image and bars, and use a php Insert command in the If statement to include it for only these categories.

So cool!

(an Admin can mark this post as Solved...I don't see a way to do it myself...)

juggledad Jun 4, 2010 05:07 AM

You should be able to do this in The LOOP and there fore not have to remember to do it the next time you upgrade.

To mark a thread solved, use the 'Thread Tools' tab near the top of the page

blogmom Jun 4, 2010 08:43 AM

Juggledad: can you give some advice about doing this in the Loop? I did try that first, but couldn't find a way. It's really is preferable considering the upgrade issues you mention.

juggledad Jun 4, 2010 09:20 AM

to keep part of a post from showing when it is in category 3,
a - go to ATO->Style & edit CENTER COLUMN->The LOOP
b - find the part you don't want, like
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
c - change the leading '<?php ' to '<?php if ((!in_category('3') {'
d - change the ending from '?>' to ' } ?>'

so that
HTML Code:

        <?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
becomes
HTML Code:

        <?php if ((!in_category('3') { bfa_post_footer('<div class="post-footer">','</div>'); } ?>
so to get rid of the byline you change
HTML Code:

<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
to
HTML Code:

<?php if ((!in_category('3') { bfa_post_byline('<div class="post-byline">','</div>'); } ?>

blogmom Jun 4, 2010 10:52 AM

in the Loop area I was only able to avoid these settings:

Code:

<?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>'); ?>

but the site's actual header remained. It wasn't until I edited header.php that I could remove the actual page header. Unless there is a trick to doing this in the Loop area?

juggledad Jun 4, 2010 12:09 PM

Do you mean the page header, ie logo menu header image?

blogmom Jun 4, 2010 12:13 PM

Quote:

Originally Posted by juggledad (Post 33617)
Do you mean the page header, ie logo menu header image?

Yep, the site logo, page header, and page and category bars above and below it. Those are what I'm able to remove using the code I posted previously with the IF logic in header.php.

juggledad Jun 4, 2010 12:31 PM

ok, I guess I was a little confused with the description.

If you want to prevent the header area from displaying on a certian PAGE you can use a CSS Insert
HTML Code:

body.page-id-xxxx #header {display:none;}
where the xxxx is the page ID of your page.

For a category page you could use
HTML Code:

body.category-xxxx #header {display:none;}
is the name of the category

blogmom Jun 7, 2010 12:47 PM

Thanks again Juggledad. I experimented with that too, but can't get it to eliminate the full page header as I can do by adding the IF logic to header.php. Maybe my solution is not the elegant approach, but it works for me.

Really nice of you to reply and help out, I do appreciate it!!

I'll mark this topic as Solved.


All times are GMT -6. The time now is 08:35 AM.

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