I have a WordPress menu that are both being used as a normal menu with page name that links to the page. I want to echo the same registered menu, but without the page name. To be clear, I still want the anchorlink, but I do not want any text contained within the anchorlink.

<li><a href="https://wordpress.stackexchange.com/questions/262026/the-page-link"></a></li>

The reason I want this is because I style the anchorlinks as small circles.

Is this possible? I tried to clear the content in css, but that does not affect the anchorlink when the page name is echoed in the HTML.

3 Answers
3

I figured out that I could use the jQuery empty() function like this to remove the text inside the anchorlink,

$('nav > ul > li > a').empty();

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *