This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Custom page template

  • Creator
  • #1457

    I might be missing something completely obvious, here, but how do I create a custom page template for Alyeska? I’m customizing the functionality of a plugin I’m using, and I’d like to throw all the code into a page template and just specify which page should display that custom tool. But the usual method of dropping a page-[slug].php into the theme folder isn’t working, and I figure you must have a function somewhere registering the various page templates the theme uses.


Viewing 1 replies (of 1 total)
  • Author
  • #1478
    Jason Bobich

    This isn’t anything specific to the theme, and there is nothing stopping you from creating a file in your Child theme called page-{slug}.php that targets a specific page with that slug. However, it sounds like you’re getting mixed up between targeting pages with theme files and creating “Page Templates” —

    What you’re describing by making files page-{slug}.php is creating a theme file for a specific page with whatever slug, but I think you’re actually wanting to create a “Page Template” that you select from when editing pages.

    The theme doesn’t need a function to register page templates, as that’s not how WordPress works. It doesn’t matter what you name the file . WordPress just scans the theme directory and adds any theme files that have a Page Template title at the top as the page templates the user can select.

Viewing 1 replies (of 1 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.