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] Style a post (blog page) different than a page (cms)?


  #1  
Old Dec 29, 2010, 07:28 AM
jasontbedell
 
75 posts · Dec 2010
Hello,

I've been searching the forums but haven't been able to figure this one out. I am working on http://litteacher.com. My friend wants to add this image (http://litteacher.com/wp-content/the...ond-header.png) to the top of just the blog pages.

You can see it more clearly here in this mockup: http://web.me.com/mwfbooks/SOS/Site_...ite.blog.2.jpg. The image is appended directly to the top of the background of the center column.

This would be on the main blog page (called "Blog") and on the single post pages. I would need to keep the rest of the site, acting as a cms, as it is.

So, I guess there are really two related issues. Is it possible to add this image to the top of the center column with no spacing or padding between the image and the background of the center column? And, is it possible to only do this for the blog, both multi- and single-post, pages?

Thank you for any help or direction you can provide. I keep recommending this theme and forums to friends because of how helpful and knowledgeable the people here are.

Jason Bedell.
  #2  
Old Dec 29, 2010, 09:30 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
The Dynamic Headers plugin should do the trick.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Dec 29, 2010, 10:30 AM
jasontbedell
 
75 posts · Dec 2010
Thank you. Which option would you recommend and, if 1, where should I add the code?


Option 1 (Recommended): Simply drop the this line of code into your theme file that controls your header (usually header.php)

Note: The location to add this code can vary widely from theme to theme and depending on your theme's css settings you may have to use Option 2 and modify the CSS of your theme **BACKUP ANY THEME FILES BEFORE MODIFYING**

<?php if(function_exists('show_media_header')){ show_media_header(); } ?>

This will automatically determine what type of media you are using and generate the appropriate code to insert it. No other coding is required on your part.

Option 2: You can use this line of code to simply get the URL of the media for a particular post or page. This will allow you to do some more advanced things and embed the media yourself if you know what you are doing.

<?php if(function_exists('dh_get_page_image_url')){ $dynamic_header_url = dh_get_page_image_url(); } ?>

You can then use the variable $dynamic_header_url however you see fit. It will contain the full path to your media file for that particular page/post, including any default media that should be shown.

Thank you again.
  #4  
Old Dec 29, 2010, 10:39 AM
jasontbedell
 
75 posts · Dec 2010
OK. I found another thread where Juggledad answered that question. The only other question I have about it is if it is possible to disconnect it from the header (I guess I could add a transparency to the top of the image if necessary) and connect it to the background of the center column?
  #5  
Old Dec 29, 2010, 11:06 AM
jasontbedell
 
75 posts · Dec 2010
It looks like I should be able to remove it with:

td#header {
padding-bottom:0;
}

What class would I add to the td#header to make it only relevant to blog pages?

Thank you.

Last edited by jasontbedell; Dec 29, 2010 at 11:14 AM.
  #6  
Old Dec 29, 2010, 12:49 PM
jasontbedell
 
75 posts · Dec 2010
Code:
body.post-172 td#header { 
padding-top: 40px;
padding-bottom: 0; 
}
This code works just for the blog page, but I don't know how to make it work for all the single-post pages.

Also, when I add this back in to fix the rest of the pages, it messes up what I had working on the blog page.
Code:
td#header { 
padding-top: 40px;
padding-bottom: 15px; 
}
  #7  
Old Dec 29, 2010, 01:11 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I am not real clear on what you are trying to accomplish but perhpas conditional php could help.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #8  
Old Dec 29, 2010, 01:16 PM
jasontbedell
 
75 posts · Dec 2010
Basically, on the blog page, I need the picture that is displayed to connect (no spacing) with the center column.

I can do this by eliminating the bottom padding in the header.

The problem in doing so is that the rest of the pages look funny; the spacing just looks wrong when that padding is removed.

Can I put php in HTML/CSS Inserts?
If so, how would I structure it?

PHP Code:
If on blog page then,
CSS
else
CSS
I know some PHP but I'm not sure how to structure the "on blog page" part.
  #9  
Old Dec 29, 2010, 01:37 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
setup the site the way you want it for all but the blog page, then add CSS Inserts to style the blog page and use 'body.blog' as the beginning selector.

For example, lets say you set the post body copy to display in blaxk, but you want them red on the blog page, you would use
HTML Code:
body.blog .post-bodycopy {color: red;}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Dec 29, 2010, 01:44 PM
jasontbedell
 
75 posts · Dec 2010
Juggledad,

That worked perfectly. You really are brilliant at this. If it helps anyone else, I used
Code:
td#header { 
padding-top: 40px;
padding-bottom: 15px; 
}

body.blog td#header { 
padding-top: 40px;
padding-bottom: 0; 
}
.
If you could, what would I put to include the single-post pages?

LMilesSW, you're help was invaluable as well. The dynamic header worked very well. Thank you both for your time.
  #11  
Old Dec 29, 2010, 01:49 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
just use 'body.single.....'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #12  
Old Dec 29, 2010, 01:53 PM
jasontbedell
 
75 posts · Dec 2010
Thanks for putting up with me. I think you declare the thread solved.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Both Blog page and Static Front page highlight when Blog page selected lomaprietapottery Page & Category Menu Bars 20 Jul 13, 2012 04:58 PM
HOWTO: make a custom text style on post/page pakacil Center area post/pages 24 Jul 18, 2011 05:53 AM
[SOLVED] Post container style different for Home Page than single post page maurixx Center area post/pages 13 Jul 23, 2010 03:14 PM
Style of Post Headline on Home Page is different vanderark1 Center area post/pages 1 Jan 28, 2010 03:13 AM
Basic level question - Wordpress as CMS with blog attached tiber Installing & running WordPress 1 Jul 21, 2009 07:12 AM


All times are GMT -6. The time now is 05:36 PM.


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