-
AuthorPosts
-
February 5, 2015 at 8:37 pm #200165
I have a Google Translate Widget I would like to appear on our static left menu bar. I’m using Icon full width with 1 page navigation that I changed the function.php file from a prior thread: https://theme.co/x/member/forums/topic/icon-demo-with-1-page-navigation/
I can’t seem to add a widget to that left menu now, I’m guessing since that menu bar isn’t supposed to be there. How could I add a widget that appears above the “Home” button? The code for the widget is [prisna-google-website-translator] My site is lexingtonhousing.org
Thank you.
February 6, 2015 at 8:35 am #200491Hi,
Thanks for writing in!
You can add the code below in your child theme’s functins.php file.
add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'primary' ) return 'Google widget code'.$items; }
Change Google widget code with your code.
Hope that helps.
February 6, 2015 at 10:44 am #200557I tried that but all I get is [prisna-google-website-translator] written on the page not the widget.
I tried a few ways:
return ‘[prisna-google-website-translator]’.$items;
return ‘prisna-google-website-translator’.$items;
return ‘Prisna GWT’.$items;All I get is writing with no widget. Here’s the specs on the widget:
Usage
– Go to the Appereance > Widgets panel, search for the following widgetPrisna GWT
– Copy and paste the following code into pages, posts, etc…
[prisna-google-website-translator]
– Copy and paste the following code into any PHP file
<?php echo do_shortcode(‘[prisna-google-website-translator]’); ?>
February 6, 2015 at 8:48 pm #200883Hi there,
Could you try this?
return do_shortcode('[prisna-google-website-translator]').$items;
Please also check if the plugin or feature related to that shortcode is active.
Thanks!
February 7, 2015 at 10:14 am #201147That worked!
Is there a way to add padding to the left of the widget area? I need it moved off the left edge a little bit.
February 8, 2015 at 1:16 am #201454Hey there,
Please give us the URL of the page so we could give you a tailored solution.
Thanks.
February 8, 2015 at 8:11 am #201603Lexingtonhousing.org
February 8, 2015 at 3:58 pm #201796Hi there,
Add this to your Customizer’s custom CSS:
.prisna-gwt-align-left{ width:65%; }
hope it helps
thanks.February 8, 2015 at 5:37 pm #201839I added it but it still looks the exact same.
February 9, 2015 at 4:56 am #202126Hi there,
Please try this instead :
.prisna-gwt-align-left { width: 65%; margin: 0 auto; display: block; }
Thanks.
February 9, 2015 at 9:14 am #202317That worked flawlessly. Thank you for the help as always!
February 9, 2015 at 2:05 pm #202545Hi,
Nice! we are glad to know it helped.
Enjoy! Thanks! 🙂
-
AuthorPosts