Hey folks,
I'm using Nicasio Design's Dynamic Headers.
My current theme is stheme and I've adapted it greatly.
I'm using the dynamic headers fine for Archive pages and pages that show posts for a specific category, but I can't get it to work at all on the main index page.
I understand enough to know where to place the "<?php show_media_header(); ?>" tag in the right place, but I'm thinking there's an issue with putting it on the main page.
In the instructions, it states that there are two options for placing a dynamic header in a page:
---------------------------------------------------------------------
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.
It is advised that most users simply use Option 1 if at all possible, as it is significantly more simple.
---------------------------------------------------------------------
Due to my complete lack of knowledge about php, I cannot for the life of me understand what they mean about the second option. I'm also very unsure if it would even work if I actually tried.
Can anyone help me implement it either with Option 1 or 2?
Gracious thanks in advance,
ATypicalTypeA