WordPress.org

Ready to get started?Download WordPress

Forums

Write post ID in text box -> go to that post (2 posts)

  1. swamplingman
    Member
    Posted 2 years ago #

    Hello everyone,

    I want to add a text box to my homepage, so that when a visitor writes the post/page ID and hit the Search Button, the browser takes them to that specific post.

    Is there a Plugin that does this, or can anyone help me by giving me an idea of how to write this code?

    Currently, all my posts display the post id in the title, and I want my visitors to get easy access to their favorite posts.

    Thanks in advance.

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Can the visitors just click on the post title? It is relatively easy to make the titles link to the posts.

    Here is some sample code (used in the LOOP):

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>

Topic Closed

This topic has been closed to new replies.

About this Topic