- This topic has 9 replies, 4 voices, and was last updated 1 year, 10 months ago by Ying.
-
AuthorPosts
-
June 10, 2022 at 1:58 pm #2249701Henk
Hi,
My question is not exactly related to Generatepress, but I couldn’t find a solution.
Hopefully, you can help me a little further.After I do a site audit with Semrush I got the error message: “11 links have no anchor text” on the page in the private area.
This URL, that generates the error message, is included in the private area.If I check the link on the container I don’t see anything wrong.
My question is: what do I need to change to solve this?Thanks in advance.
Best regards,
HenkJune 11, 2022 at 4:29 am #2250038DavidStaffCustomer SupportHi there,
does SEM Rush provide you a list of the problem links ?
June 11, 2022 at 5:11 am #2250067HenkHi David,
Thanks that you have a look.
I appreciate it.I included the rows in the private area.
Is that the information you’re looking for?Regards Henk
June 11, 2022 at 7:13 pm #2250567LeoStaffCustomer SupportI’m not sure unfortunately – don’t think it’s an error though if you don’t see anything wrong on the live page.
Have you checked with Semrush’s support team to see if they can comment?
June 13, 2022 at 12:55 pm #2252418HenkI’ve asked Semrush if they could give me an explanation what the cause of the issue could be.
They said it’s the following part in de page source:"...<span class="menu-bar-item search-item"><a href="#"><span class="gp-icon icon-search...". More specific the problem is: "..href="#"..".
A while ago I tried to realize the search function where the user can press the magnifier class in the main navigation (see the website). When the user clicks on the magnifier, the page https://<sitename>/zoek should be displayed. But somehow I couldn’t get it working.
I enabled navigation search in: Appearance > Customize > Layout > Primary Navigation.
But I can’t specify that I would like to display the page https://<sitename>/zoek.Can you tell me how I can solve it?
Thanks, Henk.
June 14, 2022 at 12:57 am #2252823DavidStaffCustomer SupportOK, so disable the navigation search in: Appearance > Customize > Layout > Primary Navigation.
Then create a new Block Element – Hook:https://docs.generatepress.com/article/block-element-hook/
Set the Hook to:
menu_bar_items
In the content add a GB Button and give it a search icon, and add your search page link.
Just to clarify the above issue where SEMRush is complaining about the
href="#"
– surely they have an option to ignore that? Its a valid use of the href – the W3 spec outlines its use for Return to Top of page, and we use it like a lot of other developers as a toggle.June 14, 2022 at 1:49 pm #2253512HenkHi David,
Hi David,
I created a new Element with type Hook and used the following code in the content area:
<a class="button zoek" href="zoek">Zoeken</a>
The text “Zoeken” is now a placeholder, if I click on it, it’s working and redirecting to the correct page.
How can I replace the text with a magnifier icon? I already added a SVG image of a magnifier with the URL: https://sitename/wp-content/uploads/2022/06/magnifying-glass.svg
Thanks for your help.
Best regards, Henk
June 14, 2022 at 3:37 pm #2253558YingStaffCustomer SupportThe easiest way is to use a block element.
Since you are already using GenerateBlocks, you can add it like a normal button but in the block element.
You can add the SVG icon to GB’s button, and there’s an option to remove text:
https://docs.generateblocks.com/article/buttons-overview/#iconHere’s a video that shows how to add an SVG icon with links to the topbar, you can have a look:
https://youtu.be/yAleVWQi5EAJune 14, 2022 at 11:45 pm #2253761HenkHi Ying, David,
I solved it thanks to your both suggestions!
Frist I created a temporarily block element to configure the button with only an icon. Then copy pasted the code en pasted it in the content area of a new Block Element – Hook and set the Hook to: menu_bar_items.
Thanks for your help.
Best regards Henk.
June 15, 2022 at 12:15 pm #2254586YingStaffCustomer SupportYou are welcome!
-
AuthorPosts
- You must be logged in to reply to this topic.