how to add a (advertising) banner image with link in the header
-
AuthorReplies
-
July 19, 2013 at 7:31 pm #9674
Jason Bobich
KeymasterHello,
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 );
July 25, 2013 at 10:34 pm #9847avandam
Participanthi, 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.
July 26, 2013 at 2:58 am #9857Jason Bobich
KeymasterThis 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
July 29, 2013 at 1:11 pm #9930avandam
Participanthi 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.
July 29, 2013 at 2:43 pm #9932Jason Bobich
KeymasterThe 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.
July 29, 2013 at 4:12 pm #9939avandam
ParticipantHi 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?
July 29, 2013 at 6:43 pm #9947Jason Bobich
KeymasterCan 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?
July 29, 2013 at 6:48 pm #9949avandam
Participantfor 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 );
July 29, 2013 at 7:09 pm #9957Jason Bobich
Keymasteri 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.
July 29, 2013 at 7:16 pm #9958Jason Bobich
KeymasterThis is all not generally this complicated. I have a feeling you’re running into an issue with W3 Total cache and not realizing it. 😉
August 2, 2013 at 8:05 am #10091Jason Bobich
KeymasterSo, 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.
August 2, 2013 at 12:09 pm #10098avandam
ParticipantHi Jason, did you manage to fix this issue? Hope to hear from you.
August 2, 2013 at 11:41 pm #10106Jason Bobich
KeymasterYup, see just above. #10091 — You need to update Akita.
August 7, 2013 at 3:11 pm #10350avandam
ParticipantHi 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.
August 7, 2013 at 8:02 pm #10382Jason Bobich
KeymasterThis is because the widgets got shifted when you changed themes (i.e. changed to the child theme).
See issue #2 here:
You just need to go to Appearance > Widgets and make sure all widgets are in the proper widget areas.
-
AuthorReplies
- The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.