get first post in custom post template according to menu order
-
I want to display the first post from the menu order in custom post template, I have this template, but if I set the order of a post as nr 1, does not load that post.
this is the template:
<?php /* template name: arh servicii */ ?> <?php get_header(); ?> <div id="content"> <div class = "menu submenu"> <ul> <?php $args = array( 'post_type' => 'servicii', 'sort_column' => 'menu_order', 'title_li' => __( '', 'textdomain' ) ); wp_list_pages( $args ); ?> </ul> </div><!-- .menu --> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id = "titlu_pagina"><?php the_title(); ?></div> <div class="continut"><?php the_content(); ?></div> <?php /*include_once get_template_directory(). "/assets/gallery.php";*/ ?> <?php endwhile; ?> <?php endif; ?> </div><!-- #content --> <?php get_footer(); ?>
- The topic ‘get first post in custom post template according to menu order’ is closed to new replies.