WordPress.org

Ready to get started?Download WordPress

Forums

Variables of post_id (1 post)

  1. iNikita
    Member
    Posted 2 years ago #

    I have a code:

    <?php
     wp_list_pages(array(
     'title_li' =>'',
     'link_before' => '<span class="meta">'.get_post_meta($post->ID, "span_title", true).'</span>
    ',
     )); ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

    It works only when I entered a page, but i need span_title it at every list item. How can i get span_title for every wp_list_pages elemet.

    Thanks for help and sorry for my bad english

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags