Add a PHP comment to the top of your file, making it a Template:
<?php /* Template Name: Whatever */
//your code here
?>
Then create a new page with your new template as page template. Publish, then you will be able to access the file through the pages permalink.
Kind of quick and dirty, but it worked for me…
Related Posts:
- wp_nav_menu(), how to change class?
- pass object/JSON to wp_localize_script
- What difference does it make if I use index.php as HTML wireframe versus writing each main template file as a full HTML document?
- What filters are applied to the_content function?
- Allow Shortcode in Theme Customizer
- Theme Customizer – Nested Sections?
- Where to post/upload the new theme for WordPress theme repository
- Is it possible to manipulate the list of page templates?
- Is there a way to set the order of wp_footer hooked functions?
- redirect does not work in ajax function
- Why is styling comments so complex?
- Add a notice to users upon first login to the admin area
- get_template_directory_uri() and other URL tags not working in theme
- Can you filter posts by meta key with the getEntitityRecords selector?
- Context aware widgets. My work in progress
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- how to make a child theme replace functions in different php files that are loaded throu require_once
- Remove “a href” from wp_list_comments()
- Get list of months with posts
- How WordPress converts URL to $query_string
- How to list all images in uploads directory except those that are attached to any post
- Advanced theme training?
- Unhook action from child theme
- Does any theme support child theme?
- 2 differen’t menus and it’s using same items in both
- “add_theme_support” for custom footer color?
- Custom WordPress install – activate custom theme
- Media Uploader in custom path
- How to remove the header from all pages except home?
- Highlight “Show all” item in wp_list_categories
- Attach media to multiple posts
- Internal error 500 accessing Theme > Customize
- Theme Development: Starter Content after hook
- Is there any WordPress theme for Self Storagae just like Spacer [closed]
- Custom page template with custom fields
- Underscore Based Theme File Permissions in Git
- How do I include pre-installed images in a theme?
- Trackbacks not displaying
- Widget Option is Missing
- How do I use a color from theme options?
- If you were to start using a WordPress framework today, which one would you use? [closed]
- Register sidebar ‘before’ and ‘after’ html as div rather than li tags
- Is it possible to have a theme that uses only one single page?
- How to include a file only on dashboard widgets page?
- JQuery undefined and Stylesheet loads in bottom along with js files
- Why tags are displayed bellow the content and not inside
- What’s the best way to create a new design for other pages?
- WP_Query $gallerypage->the_post() giving Undefined offset: 0
- How do I conditionally defer scripts based on the page name?
- How to place POST TITLE any location inside the posts page
- not getting API setting saved confirmation message after update on option page
- Do I need to re-import Susy to work with it in a child theme? [closed]
- Valid SQL query not returning results
- Change Image Sizes for Mobile Theme
- Recommended sidebar / content widths
- Converting a theme to a child theme in a network
- iPad WordPress theme?
- Adding link post format to theme and permalink to rss feed
- custom Background not showing after upgrade?
- How do I assign a particular post to a particular page in WordPress?
- Rolling your own WordPress Themes
- How to get blog-id of an MU site from functions.php
- Does single webpage do not need navigation to create a slug in permalink?
- Posts Page shows Classic Editor interface not Gutenberg
- Comment Form Development Issue
- WordPress theme doesn’t read my translations from pt_BR.po file
- Get gallery images description not work for some images id
- How to load jQuery with Ajax in WP version 5.3.2?
- How to get full native language instead of iso?
- Move the social media icons to the left of a WordPress nav menu for Soledad child Theme
- Is a multipurpose theme an alternative to modifying or creating a theme from scratch?
- Two instances of the theme folder in the URL
- I want to change the author name
- Does any JavaScript file load automatically for index.php file?
- WordPress menu walker – Get parent item text inside end_lvl function
- Display content on Single page
- Filter URL and shortcodes from the_excerpt
- Check if redirected from a specific page template
- Horizontal Navigation
- Trouble creating custom sanitization function when uploading video files
- How to store and retrieve the attachment alignment?
- Incorporate zilla shortcode into theme
- Custom image size doesn’t work
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- The content not wrapped in paragraph tags with get_page_by_title()
- How to assign the default file at “Appearance > Editor”?
- Not Found when using activity stream as front page with BuddyPress
- Import/Export WordPress demo
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- Why we do need wp_enqueue_script() function?
- Is it possible to use “wordpress.org Theme Handbook” look&feel as a theme in my own site? [closed]
- getting id of page
- How to send async emails in wordpress?
- ways to create customized theme (hard coded – no pagebuilder)
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]
- My theme is full of error messages in the “Customize” screen, but nowhere else
- Can’t select my block by clicking on it on apiVersion – but using blockProps
- Webpack does not create or update index.asset.php file in build folder
- Is there any halfway decent documentation on the wp.media JS class?