Sayfa sıralamasına göre sayfaları listeler.
<ul>
<?php wp_list_pages( array( 'sort_column' => 'menu_order' ) ); ?>
</ul>
Yazıları listeler 24 tane
<?php $args = array( 'post_type' => 'post', 'posts_per_page' => 24, 'order' => 'DESC');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
// yazı başlığı görseli açıklaman bilmemne detayları
<?php endwhile; ?>
Sayfa listeleme filtreleri. Dİrekt codex den kopyala yapıştır
- 'child_of'
(int) Display only the sub-pages of a single page by ID. Default 0 (all pages). - 'authors'
(string) Comma-separated list of author IDs. Default empty (all authors). - 'date_format'
(string) PHP date format to use for the listed pages. Relies on the 'show_date' parameter. Default is the value of 'date_format' option. - 'depth'
(int) Number of levels in the hierarchy of pages to include in the generated list. Accepts -1 (any depth), 0 (all pages), 1 (top-level pages only), and n (pages to the given n depth). Default 0. - 'echo'
(bool) Whether or not to echo the list of pages. Default true. - 'exclude'
(string) Comma-separated list of page IDs to exclude. - 'include'
(array) Comma-separated list of page IDs to include. - 'link_after'
(string) Text or HTML to follow the page link label. Default null. - 'link_before'
(string) Text or HTML to precede the page link label. Default null. - 'post_type'
(string) Post type to query for. Default 'page'. - 'post_status'
(string|array) Comma-separated list or array of post statuses to include. Default 'publish'. - 'show_date'
(string) Whether to display the page publish or modified date for each page. Accepts 'modified' or any other value. An empty value hides the date. - 'sort_column'
(string) Comma-separated list of column names to sort the pages by. Accepts 'post_author', 'post_date', 'post_title', 'post_name', 'post_modified', 'post_modified_gmt', 'menu_order', 'post_parent', 'ID', 'rand', or 'comment_count'. Default 'post_title'. - 'title_li'
(string) List heading. Passing a null or empty value will result in no heading, and the list will not be wrapped with unordered list <ul> tags. Default 'Pages'. - 'item_spacing'
(string) Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'preserve'.