-
AuthorPosts
-
May 23, 2014 at 9:54 pm #269280
Is there a way to have the search icon (and ajax drop down) appear to the right of the social media icons when the icons are located in the main header to the right?
See image here:
https://www.evernote.com/shard/s3/sh/ff4ad26b-f5c3-4db8-a37d-e8c264c440ef/dbf73269e6bb496bf33961f9e01197e2May 23, 2014 at 11:45 pm #269335Hi,
Can you post the link to the website please?
Regards,
JosueMay 23, 2014 at 11:55 pm #269348Yes, just an early version on a dev site –
May 24, 2014 at 12:08 am #269353Hi,
Try adding this at the end of the theme functions.php file:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery("ul.social_bookmarks").append(jQuery("li#menu-item-search").detach()) }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
JosueMay 24, 2014 at 12:18 am #269356That worked perfectly Josue – thank you!
May 24, 2014 at 12:21 am #269357One problem – the ajax results are all smashed together…
May 24, 2014 at 12:27 am #269358Hey!
Try adding this code to the Quick CSS:
#top div .ajax_search_entry{ width: auto !important; text-align: left !important; float: none !important; display:block !important; text-decoration: none !important; line-height: 1.4em !important; font-size: 12px !important; height:auto !important; padding:10px 16px !important; border-bottom-style: dashed !important; border-bottom-width: 1px !important; clear:both !important; overflow: hidden !important; } .ajax_search_entry_view_all { border-bottom: 0 !important; }
Cheers!
JosueMay 24, 2014 at 12:35 am #269361Okay, that seemed to fix the rest. Thanks again! Am I safe to add that to the custom.css instead? That also gets protected during theme updates, correct?
May 24, 2014 at 12:36 am #269362Only if you are using a Child Theme:
Cheers!
JosueMay 24, 2014 at 1:48 am #269378Okay, I’ll check that out. Thank you.
One other thing on the search – if you refresh the page (or when you first land on it) – once we have some content up there the Search icon appears in the menu bar and then jumps up to the Social Icons position. Is there a way to keep that from happening? It’s pretty noticeable.
May 24, 2014 at 1:53 am #269380Try changing the code to:
function add_custom_script(){ ?> <script> jQuery(function() { jQuery("ul.social_bookmarks").append(jQuery("li#menu-item-search").detach()) }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Cheers!
JosueJuly 4, 2014 at 5:40 pm #287307Okay, a follow up to this. I was able to get the search icon moved and ajax results working correctly on my DEV site here: http://itm.vm-host.net
But even though everything else is working perfectly on the production site, the AJAX search results don’t come up on the production site here: http://itestsystem.com
Any ideas? They have added the code above, but still no luck displaying ajax results on the production site…
- This reply was modified 10 years, 4 months ago by rlmilton.
July 4, 2014 at 10:48 pm #287374Hey!
There is a 500 internal server error (admin-ajax.php) on the production site (Console), try disabling the CONCATENATE_SCRIPTS parameter in wp-config.php:
define( 'CONCATENATE_SCRIPTS', false );
Best regards,
JosueJuly 8, 2014 at 4:13 pm #288575Thanks for the suggestion Josue, but still no luck. We tried adding define( ‘CONCATENATE_SCRIPTS’, false ); to the wp-config.php file.
I agree the lack of Ajax functionality is most likely due to the server 500 error when accessing ajax (only on the production server though).Request URL:http://itestsystem.com/wp-admin/admin-ajax.php
Request Method:POST
Status Code:500 Internal Server ErrorThey checked the production server logs and the only error they are seeing is pasted below but i don’t know if this is related to the Ajax error or not.
[Tue Jul 08 13:48:23 2014] [error] [client 74.218.137.202] PHP Fatal error: Call to undefined function mb_strimwidth() in /var/www/html/wp-content/themes/itm/framework/php/function-set-avia-backend.php on line 561, referer: http://itestsystem.com/Do you have any suggestions on if it is an error with the production server configuration that would cause this issue? Thanks!
July 8, 2014 at 9:03 pm #288679Hi!
Make sure that the PHP Multibyte String extension is enabled on the production install.
Cheers!
Josue -
AuthorPosts
- You must be logged in to reply to this topic.