Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS 3.4 Having Span inside native menu "a" elmt
#5
If you can't do it with CSS as Shawn suggests, another way could be this:

Create a functions.php file in your theme folder and paste this in the file:
Code:
<?php defined('IN_GS') or die();

add_filter('menuitems','add_span_to_nav_links');
function add_span_to_nav_links($nav='') {
  return str_replace('##TMP##','"><a',str_replace(array('">','</a>'),array('"><span>','</span></a>'),str_replace('"><a','##TMP##',$nav)));
}
// end

(If you theme already had a functions.php file, paste in it everything but the first line.)
Reply


Messages In This Thread
RE: GS 3.4 Having Span inside native menu "a" elmt - by Carlos - 2018-12-02, 21:23:04



Users browsing this thread: 1 Guest(s)