- This topic has 14 replies, 4 voices, and was last updated 4 years, 1 month ago by
Elvin.
-
AuthorPosts
-
August 17, 2021 at 8:43 pm #1899547
Larry
I’m guessing this is simple, but cannot figure it out. I’m just trying to add the word “Search” to my main menu, connected to the Relevanssi search engine plugin. Maybe it’s not compatible with Generate Press?? Relevanssi offers “searchform.php” and just “searchform” as a shortcode, but I have no idea where to use those.
I am open to using a Generate Press search function if that is hiding somewhere in my Premium installation and just needs to be made visible.
What can you suggest? It might also be useful to be able to place the word “Search” and/or the magnifying glass icon in other locations of the site, such as the footer.
My site if it’s useful to take a look: http://www.universalethics.com
August 17, 2021 at 9:44 pm #1899584Elvin
StaffCustomer SupportHi Larry,
Can you specify which part of the main menu do you want to add the word “Search” on? Is it as a placeholder text? or simply a word beside the search icon?
Also, will it be applied on specific page only (like Search Results)?
August 18, 2021 at 8:51 am #1900414Larry
Thanks for a quick reply, Elvin. Something came up last night and I won’t be able to respond quickly for the next few days, so please be patient.
Re. your questions: It doesn’t matter if there’s an icon or not, but would like the word Search somewhere in the Main Menu that when clicked, opens up a Search dropdown box rather than covering up all the other menu items, which it does now. If the word appears beside the icon, that’s ideal, but they both have to do the same thing, i.e., open a dropdown to enter the Search terms.
My understanding is that the Main Menu applies to all pages.
Re. your wise man quote – I assume this refers to browser cache, and not to some other type of cache somewhere.
August 18, 2021 at 9:13 am #1900461David
StaffCustomer SupportHi there,
this CSS will move the open search form below the navigation and add a border to it:
.navigation-search.nav-search-active { top: 100%; border: 1px solid #000; }
You can change the forms background and text colors in Customizer > Colors > Primary Navigation.
And if you want to add a Placeholder in the form, this article explains:
https://docs.generatepress.com/article/generate_navigation_search_output/#add-a-placeholder
Does that help ?
August 23, 2021 at 9:48 am #1905693Larry
Sorry for the delay. Yes, that CSS worked perfectly. Thank you!
A minor item, but if there’s also an easy way for me to add the word Search alongside the icon, please let me know.
August 23, 2021 at 10:22 am #1905739Ying
StaffCustomer SupportHi Larry,
Try this CSS:
/*desktop*/ li.search-item.menu-item-align-right a:after { content: "Search"; padding-left: 10px; } /*mobile*/ .mobile-bar-items .search-item a:after { content: "Search"; padding-left: 10px; }
If you want the text to be in front of the icon, change
after
tobefore
,padding-left
topadding-right
.Let me know if you need further assistance 🙂
August 23, 2021 at 10:34 am #1905752Larry
Thanks! I like the way it looks on mobile to balance the Menu!
August 23, 2021 at 11:20 am #1905797Ying
StaffCustomer SupportYou are welcome 🙂
August 24, 2021 at 9:12 am #1906995Larry
Just some feedback, David. I noticed this morning that your solution works well on all of the pages except the Home page. For some reason, there has been no change on the Home page to the original setting, i.e., the search box has no border and whites out the Main Menu.
I can live with this, but if there’s a way to fix it so that the Home page main menu works like every other page/post, please let me know.
August 24, 2021 at 7:37 pm #1907429Elvin
StaffCustomer SupportCan you try disabling the caching plugin and see if it works on all pages? It seems to be a caching issue w/ autoptimize.
Let us know. 😀
August 24, 2021 at 9:35 pm #1907510Larry
1. Yes – that was exactly the problem. Thanks for the quick fix! Now I understand what the wise man said – I thought he was referring to the browser cache.
2. Re. Autoptimize Settings, would you caution or recommend using their Optimize Images and/or Lazy-load images?
(ShortPixel claims they can compress all 10 Homepage images to less than half the size, ie. by 53%)August 24, 2021 at 9:40 pm #1907513Larry
One more thing – Autoptimize is telling me this, and I wonder if I need to do something to get better loading speed:
“It looks like your site might not have page caching which is a must-have for performance. If you are sure you have a page cache, you can close this notice, but when in doubt check with your host if they offer this or install a page caching plugin like for example WP Super Cache, KeyCDN Cache Enabler,…”
Is that relevant to Generate Press?
August 24, 2021 at 10:07 pm #1907529Elvin
StaffCustomer Supportfor #2:
It depends. You should avoid having lazy load on image if it appears above the fold as this can cause CLS.
One more thing – Autoptimize is telling me this, and I wonder if I need to do something to get better loading speed:
“It looks like your site might not have page caching which is a must-have for performance. If you are sure you have a page cache, you can close this notice, but when in doubt check with your host if they offer this or install a page caching plugin like for example WP Super Cache, KeyCDN Cache Enabler,…”
Is that relevant to Generate Press?
You should have autoptimize’s caching + modification enabled. Just make sure it’s purged so the CSS being served is the updated one. 😀
August 25, 2021 at 8:26 am #1908196Larry
Re. your final comment, I cannot find the word “modification” anywhere within the Autoptimize Settings. Did I miss it somewhere, or is there another word for this?
August 25, 2021 at 7:31 pm #1908586Elvin
StaffCustomer SupportAh sorry, I meant “minification” or “minify”.
But that’s minor. The most important thing is to always purge your cache when you change anything on the site.
And make sure you purge all cache. Some sites have a server-side cache(page cache) which is different from your plugin’s cache.
There’s also CDN cache if you’re using one.
-
AuthorPosts
- You must be logged in to reply to this topic.