Forums

Calling on Post/Page titles? (3 posts)

  1. verilix
    Member
    Posted 3 months ago #

    Hi,

    I was wondering if anyone could help me with a bit of PHP code, or even a plugin.

    I want to call on the title of a post or page, so the title of the post/page is displayed as text on the page. Along with some other text I might stick in there, such as:

    (x-men download, x-men episode download, x-men dubbed download, x-men english download, x-men stream)

    So if I have the post/page (X-men), it's used with all the other text in there. I just need a way to pull the post/page title into the bits of text I have.

    Regards,

  2. verilix
    Member
    Posted 3 months ago #

    nobody has any idea?

  3. t31os_
    Member
    Posted 3 months ago #

    In the loop...

    Either.

    <?php the_title();?>

    or.

    <?php echo get_the_title(); ?>

    Outside the loop.

    <?php echo get_the_title( X ); ?>

    Where X is the ID for the post or page you need the title for (you won't need this if used inside the loop).

Reply

You must log in to post.

About this Topic