WordPress.org

Ready to get started?Download WordPress

Forums

Create a page slug? (3 posts)

  1. djuggler
    Member
    Posted 5 years ago #

    In 2.7.1 how can I create a page slug so that I can drop some custom php code into the application? For example, if I wanted to write an application that allowed site visitors to enter some data and search it and I placed that code in searchme.php I want the users to be able to type http://domainname.com/searchme and havethat code appear within the wordpress template as if it were a page.

    Seems to me I used to be able to create a page slug called "searchme" and have that work.

    Is this the wrong approach and how do I accomplish building custom applications into a wordpress installation?

    Thanks!

  2. stvwlf
    Member
    Posted 5 years ago #

    Every page already has a slug. Create a page with the name/slug you want. make searchme.php a custom page template and assign the page named searchme to use the custome page template name that represents searchme.php

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

  3. djuggler
    Member
    Posted 5 years ago #

    Perfect! The custom page template is the step I was skipping. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic