Forums

Dynamic Headers on main index page (7 posts)

  1. AtypicalTypeA
    Member
    Posted 2 years ago #

    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

  2. AtypicalTypeA
    Member
    Posted 2 years ago #

    My site, btw, is http://www.atypicaltypea.com

  3. dcannon1
    Member
    Posted 1 year ago #

    Hi,

    You have to explicitly set the blog header image under the plugin's settings menu.

  4. AtypicalTypeA
    Member
    Posted 1 year ago #

    Hi there,

    How can I set the blog header image when it's not random and it's not a permanent image?

    Each different type/category of post needs a different header image that is specific to that category. Are you saying set a blank image and it'll work anyway by alternating the images through other settings?

  5. AtypicalTypeA
    Member
    Posted 1 year ago #

    Okay I tried that idea - not possible.

    I should have explained what I needed first.

    Each post is a part of a set of categories, using Custom Taxonomies (plugin). I want each post that is under one of these categories or taxonomies to display with a header image of the category it sits under.

    For instance, I want each blog post that is in the 'Before & After' category to display with a header image, which is 'before&after.gif' in the main page of the blog.

    Please let me know if there's any other info you need, and if I can achieve this.

  6. AtypicalTypeA
    Member
    Posted 1 year ago #

    *bump*

  7. dcannon1
    Member
    Posted 1 year ago #

    Currently there is no way to assign header images based on categories, which sounds like what you need. This is planned functionality for a future release, but there isn't currently a time frame for release of the next version. Check back in the near future for updates on the next release.

Topic Closed

This topic has been closed to new replies.

About this Topic