WordPress.org

Ready to get started?Download WordPress

Forums

change the word "Pages" to a different word with (3 posts)

  1. bangzoom
    Member
    Posted 4 months ago #

    Hi everyone, I'm trying to add some php to a sidebar menu so that it shows the children of the page it is on, one step in - I've gotten this far, but when it shows up, it has the title "Pages" - I want to change the title to "Artwork" - anyone have any ideas?

    <?php
    // Globalize the $post variable;
    // probably already available in this context, but just in case...
    global $post;
    wp_list_pages( array(
    // Only pages that are children of the current page
    'child_of' => $post->ID,
    // Only show one level of hierarchy
    'depth' => 1
    ));
    ?>

  2. nickohrn
    Member
    Posted 4 months ago #

    Use the title_li parameter!

    <?php
    
    wp_list_pages(array(
      'child_of' => get_the_ID(), // No need to use the global
      'depth' => 1,
      'title_li' => __('Artwork'),
    ));
  3. shandiz
    Member
    Posted 4 months ago #

Reply

You must log in to post.

About this Topic