wp_link_page – wrap current page element

I’m trying to make something more meaningful out of the wp_link_pages() result: $paged_page_nav = wp_link_pages( array( ‘echo’ => false ) ); // Now let’s wrap the nav inside <li>-elements $paged_page_nav = str_replace( ‘<a’, ‘<li class=”‘.$classes.'”><a’, $paged_page_nav ); $paged_page_nav = str_replace( ‘/a>’, ‘/a></li>’, $paged_page_nav ); // here I’d need to wrap the currently displayed page element … Read more

How to get current page menu item name instead of full menu item list

I would like to build a menu structure where you can only see the menu item of the current page like on this web site http://www.bigspaceship.com/services/ I search around and I have the following function so far <?php $menu_items = wp_get_nav_menu_items( ‘main-menu’ ); foreach( $menu_items as $item ) { print_r( $item ) ; // see … Read more

Page queried instead of a custom taxonomy

When I try to get an archive for a custom taxonomy, WP searches for a page and doesn’t find anything. The Setup My code from the functions.php: add_action( ‘init’, ‘register_store_taxonomy’ ); function register_store_taxonomy() { $args = array ( ‘hierarchical’ => TRUE , ‘label’ => ‘Store’ , ‘public’ => TRUE , ‘query_var’ => ‘store’ , ‘rewrite’ … Read more