WordPress.org

Ready to get started?Download WordPress

Forums

Custom header link image to attachment (3 posts)

  1. bridieamelia
    Member
    Posted 1 year ago #

    Hi,

    I have installed a custom header in our new website's theme, and added code so that it will link to whatever page that image is attached to. THis has worked in one instance (a category header), but not in the default custom header image.

    The code I have added is along the lines of:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <!--add custom header image-->
    <div><a>"><img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>"  alt="The Free Ride Voice - True Independent Surf Journalism" class="custom_header" /></a></div>
    	</header><!-- /#header -->

    with the href php being the culprit in question.

    The URL is http://www.thefreeridevoice.com.

    This website goes live tmrw for a surf comp.
    For now I have hardcoded the link URL, but this of course is affecting the one category header set so far as well, not ideal (http://www.thefreeridevoice.com/category/the-outsider/)

    The URL is http://www.thefreeridevoice.com/

    Please help!

  2. Generally speaking you would create a child theme, activate it, and then edit a copy of the header.php file in the child theme directory.

    Right now it looks like you are editing the original file and that will cause you grief when you update that theme.

    More specifically you are using a commercial theme and we do not support those here. Why not head over to the theme vendor's support forum? Support from them was part of your purchase price.

    http://www.woothemes.com/support/

    Since you've got it working for category pages it may not be a difficult thing to do. It's just not something we can help you with here.

  3. bridieamelia
    Member
    Posted 1 year ago #

    Thanks Jan, will do

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.