-
AuthorPosts
-
May 26, 2015 at 10:32 pm #282593This reply has been marked as private.May 27, 2015 at 12:54 am #282650
Hi there,
Please remove it from php file and place it under Customize -> Custom -> CSS.
Thanks,
May 27, 2015 at 11:39 am #283072This reply has been marked as private.May 27, 2015 at 3:37 pm #283342Hi again,
Have you activated the X-Child-Theme? The code you paste in child theme’s functions.php file won’t work until the child theme is activated. Please make sure it is currently active. Then paste the PHP code (provided in https://community.theme.co//forums/topic/adding-buttons-to-topbarnavbar/#post-282355) only in your child theme’s functions.php at the bottom of the file. Please do not add anything in parent theme.
Regarding your footer issue please add the following code in your Customizer via Appearance > Customize > Custom > CSS:
.x-colophon.bottom .x-nav li { float: left; list-style-type: none; padding: 0 30px 0 34px; }
Let us know how this goes!
May 27, 2015 at 4:34 pm #283430Sadly, it’s not helped; the website is still quite broken (although it didn’t crash it this time). I followed your instructions and activated my child theme. Then I added the following to the functions.php file:
`// Add button to nav menu
// =============================================================================
function x_button_nav_item( $items, $args ) {if ( $args->theme_location == ‘primary’ ) {
$items .= ‘<li class=”menu-item x-menu-item x-menu-item-button”>’
. ‘<span>’
. do_shortcode(‘[button shape=”rounded” size=”regular” float=”inline” info=”none” info_place=”top” info_trigger=”hover” href=”https://acceptance.gowall.com/#/login” class=”nav-button”]Login[/button]’)
. ‘</span>’
. ‘‘;
}return $items;
}
add_filter( ‘wp_nav_menu_items’, ‘x_button_nav_item’, 10000, 2);
// =============================================================================if( ! function_exists(‘x_button_nav_item’) ) {
function x_button_nav_item( $items, $args ) {if ( $args->theme_location == ‘primary’ ) {
$items .= ‘<li class=”menu-item x-menu-item x-menu-item-button”><span>Square Button</span>‘;
}return $items;
}
add_filter( ‘wp_nav_menu_items’, ‘x_button_nav_item’, 10000, 2);
}’The site is test-portal.gowall.com, and all the parent theme files are untouched (including functions.php)
May 27, 2015 at 8:45 pm #283760Hi,
In that case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks!
May 28, 2015 at 1:33 am #284054This reply has been marked as private.May 28, 2015 at 5:13 am #284254This reply has been marked as private.May 28, 2015 at 12:48 pm #284770This reply has been marked as private.May 28, 2015 at 9:46 pm #285325Hi there,
Before we go deeply into tweakings, maybe let us fix the layout issue when switching to child theme. The provided php code should be added at child theme’s functions.php so it’s only logical to solve the child theme issues first 🙂
First, while your parent theme is active.
1. Please export your customizer settings at Admin > Addons > Customizer Manager.
2. List all your widgets and menu (later you will have to re-add them if they are missing).
3. Edit your child theme’s functions.php and make sure that this line of code is present.add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
4. Activate your child theme
5. Import your customizer settings you previously exported.
6. Re-add your menu and widgets if missing.Then let us know any result. Please disable your custom templates from your child theme if you have older copies.
Thanks!
May 28, 2015 at 11:43 pm #285412Followed your instructions, which didn’t change anything (layout was still messed up after activating child theme). I deleted the php code for the navbar button and search, but it only made the site look a little less crazy (only the
add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
line appears as text on the site now).May 29, 2015 at 6:40 am #285761Hi there,
Your child theme’s functions.php file was missing
<?php
at the start, so I just added it and the layout looks good now. Please confirm.Thanks.
May 29, 2015 at 5:01 pm #286244Yes, that got the website working; HOWEVER, none of the php code you’ve provided me with works! it all crashes my site 🙁
May 30, 2015 at 6:12 pm #287041Hi there,
In that case, I’d like to see the actual errors it throws. Would mind providing a guide of how we can get in at your site without FTP?
Or maybe provide screenshots of error and the actual source code added.
Thanks!
June 1, 2015 at 7:08 pm #289188There is no error; only the site crashes soon after making those modifications to the functions.php file. Is there any chance you could just go in with the WP credentials and see why this is happening? This is really frustrating and I’m losing a lot of valuable time with non-functional code that you have provided me…
-
AuthorPosts