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.

how to add a (advertising) banner image with link in the header

  • Creator
    Topic
  • #9663
    avandam
    Participant

    how can i add a banner in the header between the logo and social sharing buttons?
    help is much appreaciated

Viewing 15 replies - 1 through 15 (of 19 total)
  • Author
    Replies
  • #9674
    Jason Bobich
    Keymaster

    Hello,

    This will be a customization you’d need to make from your Child theme. A good approach for things like this is to understand what actions are in WordPress and how they can be utilized within the theme.

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

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

    Currently the social icons are hooked to “themeblvd_header_addon” and so you’d want to hook there with lower priority number than default 10, something like this:

    function my_header_addon() {
    	?>
    	// your html here...
    	<?php
    }
    add_action( 'themeblvd_header_addon', 'my_header_addon', 9 );

    http://codex.wordpress.org/Function_Reference/add_action

    #9847
    avandam
    Participant

    hi, i managed to install the child theme and added the function as you described. so this works. but somehow when i active the child theme i loose all the appearance (colors, menu) which are selected in the normal akita theme. how can i just add the banner and keep all the appearance settings from the akita normal theme? thanks for your support.

    #9857
    Jason Bobich
    Keymaster

    This is because theme options are saved based on the name of the current theme, which changes when you install a Child theme.

    Checkout this article:

    http://dev.themeblvd.com/tutorial/saving-theme-options-and-switching-themes/

    And there’s a workaround at the end:

    http://dev.themeblvd.com/tutorial/saving-theme-options-and-switching-themes/#fix

    #9930
    avandam
    Participant

    hi jason, i read the article and applied the fix. do i need to put in someting such as name and id. because if i just copy past the fix, it still shows the child theme options.

    #9932
    Jason Bobich
    Keymaster

    The snippet should be all you need, unless you’ve changed the name of the Parent theme at some point when you saved your options previously?

    You can also try it like this, which should be the same thing essentially —

    function my_option_id( $option_id ) {
        return 'akita';
    }
    add_filter( 'themeblvd_option_id', 'my_option_id' );

    And this should be going in the functions.php of your activated Child theme.

    #9939
    avandam
    Participant

    Hi Jason,
    I disabled my w3 total cash to be sure, and added the latest snippet after removing the other.
    unfortunately it doens’t work 🙁
    when i select akita child: the page refreshed and ends up in the options.

    however i do see the banner in the header, only with all the basic options of akita set… is there a solution?

    #9947
    Jason Bobich
    Keymaster

    Can you explain again what the problem is? I think we might be talking about different things.

    when i select akita child: the page refreshed and ends up in the options.

    Yup, when you activate the theme or child theme, it forwards to the theme option page. But what does that have to do with anything? I’m just not quite following the issue, I don’t think. Maybe you could explain a little more what you’re running into that’s an issue?

    #9949
    avandam
    Participant

    for this website: http://iafnet.eu/, where i use akita. i would like to have a banner in the header. so i installed the child theme. i added the snippet in the functions.php of the child. i uploaded this and selected this theme.
    i end up with the child theme and banner but the corresponding options of the child theme. i tried to do both fixes one at a time. but i end up with theme options of the child. somehow both fixes didn’t resolve this issue.
    this is my function.php (fyi the child theme is not active – since it messes up the site layout)

    <?php
    function my_option_id( $option_id ) {
        return 'akita';
    }
    add_filter( 'themeblvd_option_id', 'my_option_id' );
    function my_header_addon() {
    	?>
    	<div style="float:right;width:60%;">
    		<img src="http://iafnet.eu/wp-content/uploads/2013/07/iaf-banner.png">
    	</div>
    	<?php
    }
    add_action( 'themeblvd_header_addon', 'my_header_addon', 9 );
    #9957
    Jason Bobich
    Keymaster

    i end up with the child theme and banner but the corresponding options of the child theme.

    So what you’re trying to say is that your current theme options, with the purple, stretch layout, etc, do not display after activating the Child theme?

    Send me a login to WP admin, and I’ll do it for you.

    You can send the info by going to My Account > Submit private info here on the support forum. If you’re sending the info, let me know so I can check for it.

    #9958
    Jason Bobich
    Keymaster

    This is all not generally this complicated. I have a feeling you’re running into an issue with W3 Total cache and not realizing it. 😉

    #10091
    Jason Bobich
    Keymaster

    So, the reason the filter isn’t working is because you’re using the very original Akita 1.0, when the filter did not exist. A lot has changed since then. I would get the latest version by downloading it again from your ThemeForest downloads page, which is Akita 1.1.5. It doesn’t look like you’ve made any actual code customizations so far; so updating should be really easy for you.

    Without updating the Akita parent theme, the only other option would just to take 10-15 minutes and re-configure your Theme Options after switching to the Child theme.

    #10098
    avandam
    Participant

    Hi Jason, did you manage to fix this issue? Hope to hear from you.

    #10106
    Jason Bobich
    Keymaster

    Yup, see just above. #10091 — You need to update Akita.

    #10350
    avandam
    Participant

    Hi Jason, i have updated all theme files and child theme, somehow the right sidebar keeps showing above the post/pages. i cleared W3TC. but the issue remains: see http://iafnet.eu/. This is with child theme en normal akita theme… Thank you in advance.

    #10382
    Jason Bobich
    Keymaster

    This is because the widgets got shifted when you changed themes (i.e. changed to the child theme).

    See issue #2 here:

    http://dev.themeblvd.com/tutorial/switching-to-a-child-theme-after-youve-already-started-building-your-website/

    You just need to go to Appearance > Widgets and make sure all widgets are in the proper widget areas.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.