Home › Forums › Basel support forum › header shorcode
header shorcode
- This topic has 20 replies, 2 voices, and was last updated 6 years, 5 months ago by
bruno.
-
AuthorPosts
-
August 21, 2018 at 1:58 pm #73627
brunoParticipanthi,
I have chosen simplified header and would like to place a shortcode on the left next to search icon.
Is this possible?
Thanks
August 21, 2018 at 2:34 pm #73637
Artem TemosKeymasterHi,
Try to add the following PHP code snippet to the child theme functions.php file and then put your shortcode to the header widgets area in Appearance -> Widgets
add_filter( 'basel_header_configuration', 'basel_custom_header_configuration', 1, 1 ); function basel_custom_header_configuration() { return array( 'container' => array( 'wrapp-header' => array( 'logo', 'main_nav', 'right-column' => array( 'widget_area', 'search', 'wishlist', 'cart', 'mobile_icon', ) ) ), ); }
Regards
August 21, 2018 at 4:32 pm #73660
brunoParticipantThat did not work it changed badly the layout.
Attachments:
You must be logged in to view attached files.August 21, 2018 at 5:29 pm #73668
Artem TemosKeymasterCould you please send us a link where we can see how it looks now?
August 21, 2018 at 6:00 pm #73670
brunoParticipantthis is test web that i use incase i mess the real thing up
thanks
August 21, 2018 at 7:04 pm #73688
brunoParticipantOkay maybe i am doing this wrong so have installed plugin woo-commerce
Currency Converter Widget and it works fine as you can see on the filters section but i want to add it to the right on top of the shopping cart?Attachments:
You must be logged in to view attached files.August 21, 2018 at 7:06 pm #73691
Artem TemosKeymasterYou wrote that you set simplified header layout but it is set to different type. Could you please specify what kind of header you would like to use and where you want to place the shortcode?
August 22, 2018 at 9:49 am #73785
brunoParticipantI have selected simplified and have removed top bar option as i want only the main menu.
I would like the shortcode on top of the shopping card please its where the currency option will be.Thanks
Attachments:
You must be logged in to view attached files.August 22, 2018 at 11:08 am #73801
Artem TemosKeymasterCould you please send us your admin access so we can check it?
August 22, 2018 at 11:22 am #73806
brunoParticipantSo have added the widget woocommerce currency converter to the header as it says and does not show that is why i asked for shortcode hope this helps thanks.
August 22, 2018 at 12:31 pm #73814
Artem TemosKeymasterYes, but you said that you use simplified header and we provided a code for you to do that. But as we can see, you don’t use this header and that is why we asked you for admin access to check your configuration first. You didn’t send me your username, only password.
August 22, 2018 at 1:00 pm #73824
brunoParticipantSo sorry included and i have its on the setting shown as selected, maybe i have done something wrong.
August 22, 2018 at 1:04 pm #73827
Artem TemosKeymasterYour header is set to
Double menu
https://gyazo.com/f55ee28d8bd53acd00bef015fdcf43fb
So try this code and then add your widgetadd_filter( 'basel_header_configuration', 'basel_custom_header_configuration', 1, 1 ); function basel_custom_header_configuration() { return array( 'container' => array( 'wrapp-header' => array( 'right-column left-side' => array( 'mobile_icon', 'search', 'wishlist', ), 'logo', 'main_nav', 'right-column' => array( 'widget_area', 'header_links', 'cart', ) ) ), ); }
August 22, 2018 at 3:12 pm #73841
brunoParticipantperfect that worked thank you so much
August 22, 2018 at 3:34 pm #73846
brunoParticipantone more thing sorry can i align to the right as now its based to the left
thanks againAugust 22, 2018 at 5:20 pm #73870
Artem TemosKeymasterTry this CSS code
.widgetarea-head { padding-right:0!important; padding-left:0!important; float:right; }
September 25, 2018 at 3:56 pm #78971
brunoParticipantHi,
Okay so i didnt use this code
.widgetarea-head {
padding-right:0!important;
padding-left:0!important;
float:right;
}and only the function code which then i changed to be pointed to the left and it has done so but is not in line with the icons, how can i change that please.
thank you
Attachments:
You must be logged in to view attached files.September 25, 2018 at 8:21 pm #79026
Artem TemosKeymasterSorry, but your request is not quite clear and we can’t visit your website now https://gyazo.com/852cc45d74c9c809b8eb014b7ca20220
September 26, 2018 at 4:31 pm #79256
brunoParticipantSorry had to create a new temp link
Thank you
September 26, 2018 at 5:57 pm #79285
Artem TemosKeymasterTry to increase right column width in Theme Settings -> Header -> Layout and use this CSS code
body .main-header .widgetarea-head { display: inline-block; }
September 27, 2018 at 8:39 am #79397
brunoParticipantPerfect thank you that worked
-
AuthorPosts
The topic ‘header shorcode’ is closed to new replies.
- You must be logged in to create new topics. Login / Register