This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Custom headers for each page

  • Creator
    Topic
  • #17868
    Mark Wiard
    Participant

    I would like to be able to place a different header image on each page. Can you suggest a theme or plugin that will do this?

    Alternately maybe you are aware of tutorial or other technique that will help me do this.

    Thank you,
    mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #17870
    Jason Bobich
    Keymaster

    Hello Mark,

    Unfortunately, there’s not going to be any kind of plugin or feature in the theme that’ll allow you to do this.

    In order to do something like this, you’ll want to understand action hooks.

    http://dev.themeblvd.com/tutorial/actions/

    http://dev.themeblvd.com/tutorial/primary-framework-action-hooks/

    One way to accomplish what you want would just be to hook your own function to “themeblvd_header_content” — which is where the theme’s logo is outputted by default. Within your hooked function, you’ll use WordPress conditionals to control what shows depending on the page. And you’ll just be manually outputting the HTML for your various header images.

    function my_header_content() {
    	if ( is_page('foo') ) {
    		echo '<img src="http://yoursite.com/logo_1.png" />';
    	} else if ( is_page('bar') ) {
    		echo '<img src="http://yoursite.com/logo_2.png" />';
    	} else {
    		echo '<img src="http://yoursite.com/logo_3.png" />';
    	}
    }
    remove_action( 'themeblvd_header_content', 'themeblvd_header_content_default' );
    add_action( 'themeblvd_header_content', 'my_header_content' );

    Note: This would be going in your child theme’s functions.php.

    #17871
    Jason Bobich
    Keymaster

    Full docs on WP conditional tags: http://codex.wordpress.org/Conditional_Tags

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.