Forums

Is it possible to 'get a page title' without using wp_list_pages? (3 posts)

  1. Copernicus
    Member
    Posted 5 years ago #

    Hello!
    I've think I've done my research but can't find a solution to the following:

    I'd like to "get" a page title to use the body of other content within a site. For example, having "for more information read our article on _______" (where ______ is the title of a page that will change over time (and, thus, cannot be hard-coded into the link)).

    The only thing that I've come up with so far is:

    <?php wp_list_pages('exclude=1,3,4,5,6,7&title_li='); ?>

    when the page with an ID of "2" is the page title I'd like to display (but, this method requires overriding the presentation of the page title within a list -- and even the page title being a link is unnecessary).

    Is there a way to simple "get" a page's title to display within the body content of a different page?

    Thank you for any & all help!

    Just for reference, I've already checked:
    http://codex.wordpress.org/Linking_Posts_Pages_and_Categories
    and it does not seem to have the information for which I'm searching.

  2. moshu
    Member
    Posted 5 years ago #

    This would be the right article:
    http://codex.wordpress.org/Customizing_the_Read_More
    though I can's see how is it possible what you want.

  3. Copernicus
    Member
    Posted 5 years ago #

    Thank you for your help moshu, but I don't think that is the way to solve the issue.
    Since that instance of "get_the_title" only references the current page/post.
    What I need to do is call the title of (any) page to display within a completely different page. Furthermore, that call of the title needs to be in the page's content, not in The Loop.

    Any ideas?

    (thanks again)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags