Jump to content
Sign in to follow this  
jamesh

Dynamic Headers PlugIn... Will it work with platform pro?

Recommended Posts

jamesh

I bought the platform pro from pagelines and I am contemplating building a site using the platform, but before I begin developing the site, I want to know will dynamic headers plugin work? It is completely necessary that it works and I don't want to end up with a coding nightmare.

Share this post


Link to post
Share on other sites
Andrew

Haven't seen that plugin.. what can you tell us about it? what does it do and how does it work?

Share this post


Link to post
Share on other sites
biko
http://nicasiodesign.com/blog/wordpress-plugins/our-first-public-wordpress-plugin-dynamic-headers/ It's a plugin allowing you to use different headers on individual posts or pages. I saw some CSS code in one of the forum posts here that allowed you to do a similar thing, but now I cannot find it, doh. So I found the dynamic header plugin and am trying it out on Platform Pro. It requires some extra steps so far and hasn't been updated in a while, but if it works, it could be very handy. Bill P.S. If anyone knows the aforementioned CSS code, I would love to see it again!

Share this post


Link to post
Share on other sites
biko

Hi catrina, Obviously more steps than I know! It requires you to add some custom code to the header.php file, I assumed I could do this by adding it to the Custom Code section of Platform Pro, specifically the Header Scripts section, but it doesn't seem to be working for me. They have two options and option one the code they were asking for is as follows, <?php show_media_header(); ?> after trying this and uploading the alternate header for the page, it defaulted to the main header. so I tried code snippet two, <?php if(function_exists('dh_get_page_image_url')){ $dynamic_header_url = dh_get_page_image_url(); } ?> and substituted the dh_get_page_url with the url to the file. still no luck. So I'm not sure if the way Pagelines feeds the header info is causing the problem, or whether I just don't get it. Anyone have any thoughts on how else to have a specific header for one page only? Thanks, Bill

Share this post


Link to post
Share on other sites
biko

I am only hoping to use a different image for one particular page which I have set up as the static "home" page in Wordpress. All other posts and pages will have the standard image as defined under the global options. Any wonderful thoughts? Thanks, Bill

Share this post


Link to post
Share on other sites
Kate

Hi biko, You could add that code to the header via a hook. Or, you could simply swap out the header image with CSS ;)

Share this post


Link to post
Share on other sites
biko

And there's the rub, any suggestions for the CSS inept as to what the code to use would look like? And would I still just drop it into the custom code section, or would I need to go in and edit specific files to make it work? Thanks, Bill

Share this post


Link to post
Share on other sites
catrina

The CSS code will be dropped into the custom code section (no editing of specific files required). The first thing you need to do is determine the page ID for that page where you want the custom header. Can you post a link to that page so I can show you how to identify it? (From there, we can figure out what CSS to add)


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
biko

Hi Catrina, The page id is page-id-160 and the actual page link is as follows http://www.avaniraproperties.com I tried using some of the code listed earlier in this string, but either I did it horribly wrong or have the incorrect code. Thanks, Bill

Share this post


Link to post
Share on other sites
biko

OK, more searching around online and found this, <?php if ( is_page( 'about' ) || '2' == $post->post_parent ) { // the page is "About", or the parent of the page is "About" $bannerimg = 'about.jpg'; } elseif ( is_page( 'learning' ) || '56' == $post->post_parent ) { $bannerimg = 'teaching.jpg'; } elseif ( is_page( 'admissions' ) || '15' == $post->post_parent ) { $bannerimg = 'admissions.jpg'; } else { $bannerimg = 'home.jpg'; // just in case we are at an unclassified page, perhaps the home page } ?> Does this look like the proper code to use to use a different image on one page? Rather than supply the page_id it looks like it can just use the page name. The page in this case would be the default or "Home" page for my client and then it would be a matter of pointing to the correct address for the actual image. I think, would love to get some input from the code experts. Thanks, Bill

Share this post


Link to post
Share on other sites
catrina

You can try the code above and see if it works. If it doesn't, then either CSS or a hook should be used.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
biko

OK, that didn't work either. I guess the million dollar question (for me at this point) is, Does anyone know what code I can add to the custom code header script section of Platform Pro allowing me to change one specific header for a page I have id'd as page-id-160? I keep searching and finding various ways that are working for people using other types of themes, but due to my extremely limited knowledge of CSS I don't know whether it's the code I am trying to use, whether I am putting it in the incorrect place or whether it's simply not possible with Platform Pro. Thanks, Bill

Share this post


Link to post
Share on other sites
kastelic

Here's a CSS way to do it. Paste into Custom Code -> Custom CSS. Upload your new image via the media uploader to get the url for it.

	.page-id-160 .mainlogo-img{ display:none }
	.page-id-160 .mainlogo-link{
	display:block;
	height:200px;
	background: url(YOUR-NEW-IMAGE-URL) no-repeat;
	}
	

Share this post


Link to post
Share on other sites
biko

kastelic, you are a life saver!!! That works perfectly and is so simple compared to the reams of other code snippets i have been finding everywhere (that didn't work either). Thank's to everyone for the help and suggestions, Bill

Share this post


Link to post
Share on other sites
jverbeelen
I have the same problem, but I would like to change my header on the blog part of my site. The above solutions works brilliantly on pages, but when I put the page id in for my blog page it doesn't work. I have my settings on static page for main page and then the blog going to a pre-assigned page. My site is www.turtlewings.be Can you tell me how to do the same with my blog part of the site, so also on the post pages, archive pages, tags and categories and so on! Cheers, Jules p.s. here is the direct link to the blog page http://www.turtlewings.be/?page_id=47

Share this post


Link to post
Share on other sites
jverbeelen
Ok, I have messed around and was thinking to add the heading I want as my blog image to the main one and use the code above for all pages. Two questions can I use an array of pages in that code and if so how do I write it. All I have figured out so far is I can copy and paste it over and over and over... and it works. This is really a very long round about way of doing it, but it is better than changing it on every posts I put up, which is daily! Can anyone give me some advice I would greatly appreciate it! Jules

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×