Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts

    Wordpress plugin - custom templates and urls

    I need to create a wordpress plugin that has custom urls and templates and where the data all comes from an external source.

    eg. www.example.com/search-results will run custom code to get search results from an API and then display the search-results.php template
    www.example.com/item/id will get the details of {id} and display the view.php template

    I've searched for days for how to do this but maybe I'm not using the right terms as I can't find anything. The most similar examples I can find all create custom post types because the data is stored in the database rather than coming from an API.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Posts
    462
    Thanks
    0
    Thanked 20 Times in 20 Posts
    So you want to pull alist of templates from somone elses website and plug them into yours?
    Sound like the simplest way would be to frame their pages
    Id this with or without their permission?
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    For projects using MediaTypes (MIMETypes) visit E-BAM.net -(updated weekly)

    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #3
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    No, that's not it at all. I want the user to be able to go to example.com/search-results and the code that gets run is custom plugin code that connects to an external api, downloads the data and displays it using a custom template that is also part of the plugin (rather than the theme)

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Posts
    462
    Thanks
    0
    Thanked 20 Times in 20 Posts
    It would would seem that the words you are using are not showing others the idea that's in your head.
    My suggestion would be to make graphics of what you are trying to achieve and post them, someone may know what to search for or help you build it.
    1. Your website
    2. What you think your plugin would look like embedded in your site.
    3. How it would search/display the results etc.
    You may be surprised, then again you may not.hehehe
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    For projects using MediaTypes (MIMETypes) visit E-BAM.net -(updated weekly)

    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #5
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    I really don't see how adding pictures will help with what is essentially a very simple concept. What is on the page or what the website looks like is irrelevant to the problem of creating a page on a specified url.

  • #6
    Regular Coder
    Join Date
    Sep 2002
    Posts
    462
    Thanks
    0
    Thanked 20 Times in 20 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •