it was working very well.
Now, inside the menu label the svg image is interposed, which expands the image and warps the menu.
Is there any solution? Thank you.
if ( has_nav_menu( 'primary' ) ) {
$args = array(
'theme_location' => 'primary',
'container' => '',
'menu_class' => genesis_get_option('nav_superfish') ? 'nav superfish' : 'nav',
'link_after' => '<span class="navpipe">|</span>',
'echo' => 0
);
$nav = wp_nav_menu( $args );
}
So as you can see I’ve added a pipe to the menu, unfortunately this is adding to the sub-menu items also. I know you can run conditionals inside an array but each attempt I’ve made has broken something. How would I say:
if top-level then add 'pipe' else ''
I do not want to remove the sub-menus I just do not want the sub-menus to have the link_after
Thanks in advance
]]>something like this –>
<?php wp_list_pages('link_after='. $slug->post_name .''); ?>
This way i could use the page slug of meta value as a page description in the navigation of the pages.
]]>I wish to add below the anchor of a Page, inside a Custom Menu, the Page excerpt, as a brief abstract/description of the Page itself on the menu.
So first I activated the Page excerpt in the functions.php with this:
add_post_type_support( 'page', 'excerpt' );
then I declared my Custom Menu in my header.php as follows:
<?php wp_nav_menu(array('menu' => 'Main Nav Menu', 'link_after' => '<div class="abstract"><strong>Lorem ipsum</strong></div>' )); ?>
I wish to replace the “Lorem ipsum” text with something that would extract the excerpt of each page dynamically.
I already tried the_excerpt(); and get_the_excerpt(); functions with no succes, probably because Im using them outside of the loop..
Any ideas?!
Thank you in advance
What I am trying to accomplish is adding parameters to only certain pages in the wp_list_pages tag. For example, I would like to add a “<span>” after certain pages and not all of the ones in the list. The example below may better illustrate this…
wp_list_pages(‘link_after=<span>hi</span>’)– Again, only apply this to certain pages.
]]><?php wp_list_pages('link_after=<span>- This is an additional text</span>'); ?>
The code above creates the full list of pages with links and there’s an additional <span> next to each link, so it looks like that:
How to make it more dynamic?
I’d love to have something like:
Any helping hand?
]]>I am using <?php wp_list_pages('title_li=0&sort_column=menu_order&link_after= /'); ?>
to list my pages, so after every page an ‘/’ symbol is displayed. This works fine.
However when I apply this theme to another WordPress blog it just doesn’t display the ‘/’. I’ve automatically upgraded the WordPress version because I am aware that ‘link_after’ has only been available since 2.7.
I literarily have no idea why this might be. If anyone can help me out it would be greatly appreciated.
Thanks
Chris
]]>What is the best way to separate page headers with the ‘/’ symbol?
Currently I am just using:
wp_list_pages(‘title_li=0&sort_column=menu_order’);
to display the page titles.
Any help would be greatly appreciated,
Thanks
Chris
]]>my code is as follows:
<?php wp_list_pages('depth=1&title_li=&link_after=<span class="clearstick"> / </span>'); ?>
but is does not work.
How can I have it so the dash and the space either side appears after each menu item?
]]>