post_type to nav-menus
-
Hi, I have a get_template_part(‘upper’); to index.php
upper.php:
<?php $args = array( 'numberposts' => 10, 'offset' => 0, 'category' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => array('flight', 'bus', 'train', 'car'), //Transport 'post_status' => 'publish', 'suppress_filters' => true ); $recent_posts = wp_get_recent_posts($args); foreach( $recent_posts as $recent ){ echo '<div><a href="' . get_permalink($recent["ID"]) . '">'.$recent["post_title"]."</a></div>"; echo "<div>".get_the_post_thumbnail( $recent["ID"], array(80, 80), array('class' => 'post_thumbnail') )."</div>"; }
That is fine. I see the titles and pics in the site.
Now I want to have a Transport to /wp-admin/nav-menus.php. Transport is flight, bus, train and car.
I don’t know:
Custom Links
URL=/transport
Navigation Label=Transport
But I see “Error! That page can not be found”Could you help me?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘post_type to nav-menus’ is closed to new replies.