help customizing pages.
-
i created my own theme, i’m using a different menu.
in the widgets.php i have:
function wp_widget_pages( $args ) { extract( $args ); $options = get_option( 'widget_pages' ); $title = empty( $options['title'] ) ? __( '' ) : $options['title']; $sortby = empty( $options['sortby'] ) ? 'menu_order' : $options['sortby']; $exclude = empty( $options['exclude'] ) ? '' : $options['exclude']; if ( $sortby == 'menu_order' ) { $sortby = 'menu_order, post_title'; } $out = wp_list_pages( array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) ); if ( !empty( $out ) ) { ?> <div id="menu"> <ul> <?php echo $out; ?> </ul> </div> <?php } }
And what I’m getting in HTML is:
<div id="menu"> <li class="pagenav">Pages<ul><li class="page_item page-item-2"><a href="https://www.sonsofmarshall.com/about/" title="About">About</a></li> <li class="page_item page-item-4"><a href="https://www.sonsofmarshall.com/thundering-herd-newswire/" title="Thundering Herd Newswire">Thundering Herd Newswire</a></li> </ul></li> </div>
I’m trying to get rid of the <li class=”pagenav”>Pages and the at the end of the HTML output
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘help customizing pages.’ is closed to new replies.