Support » Fixing WordPress » Get title from permalink

Viewing 9 replies - 1 through 9 (of 9 total)
  • tsguitar

    (@tsguitar)

    Did you search anywhere before you posted this question? You’ll get the answers much more quickly if you search either something like Google or the Codex.

    Having its permalink only?? As opposed to what else? I’m not quite sure what you mean.

    Here’s how to display the title of a post:
    <?php the_title(); ?>

    Here’s how to display the title of a post with a link to itself:
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>

    vernikr

    (@vernikr)

    I want to print the title of page number 1 on the page number 2. I know only the permalink and the ID of page number 1. I expect function like this:

    GetTitle($my_permalink)

    or

    GetTitle($my_ID)

    Is there _any_ way to get title of non current page?

    tsguitar

    (@tsguitar)

    vernikr

    (@vernikr)

    Yes… But how can I get the title of any post (not only previous or next)?

    tsguitar

    (@tsguitar)

    Does it need to by dynamic? You can’t just type it out? If you know the ID and permalink, you obviously know the title, but that would mean you need to hand code it. Hrmm… Let me look around a bit.

    vernikr

    (@vernikr)

    Yes, it is dynamic and I can’t type it manually.

    I have a gallery. This gallery consits of sevaral pages (1, 2, 3 …). On each page I want to have 5 links to some posts (link is a gellery item). But I can’t write all links on each page manually. Instead of doing so I get the post ID’s from some file. This file can contain only ID’s or permalinks and can’t contain titles of pages (if it could the would be no problem).

    tsguitar

    (@tsguitar)

    Here you go:
    http://wordpress.org/support/topic/69219?replies=3

    Actually, a quick Google search for “get post title for a specific post wordpress” found that as result #1. Did you search before you posted here? You would have found the answer much faster.

    vernikr

    (@vernikr)

    Thanks a lot, tsguitar! Maybe I used search incorrectly.

    tsguitar

    (@tsguitar)

    Can you mark this topic “Resolved”? Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Get title from permalink’ is closed to new replies.