There is no template for “/widget”. Templates are about content types and not URL fragments.
IMO your page hack is totally legit. Another way to handle this is to have a widgets category which is the parent of all other categories and change your permalink structure to /%category%/%postname%/
Related Posts:
- Is it possible to list post attachments in a sub URL endpoint with a dedicated template?
- How to get full content including template HTML
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Link to blog index from template
- Change author slug and functionality
- Avoid WordPress categorizing a permalink request as Not found 404 Page
- All top-level pages are using index.php as template
- WordPress Not Using Template Files After Permalink Update
- Changing permalink name redirects to another template?
- implement separate templates for 1 post type
- Access or edit custom generated permalinks with WP_Rewrite
- optional parameter in permalink structure
- Single.php not loading when permalink only contains date information
- Rewrite single template permalink?
- single.php being ignored, going straight to attachment.php
- Select page/template from the permalink url
- Permalink / sub-template issue
- wp_get_attachment_url not working
- Choose template depending on URL
- Image not Showing (Can see image in inspect element)
- Change media item permalink
- Why is “/page/2/” not working?
- Can’t get a custom template taxonomy page to display
- Is the permalink structure /%post_id%/%postname% faster or slower than just /%postname%?
- Why would Numeric permalinks work, but %postname% won’t?
- Passing variables through permalink structure
- Remove subfolders from URL
- htaccess or redirect to cloak portion of a link?
- What is the action or filter for changing permalink in Edit Post/Page?
- WordPress Permalinks %postname% for RSS2 Feed URL
- wordpress permalinks tweeks
- generate custom permalink based on a custom field
- How to get wordpress link to fully evaluate when coming from facebook
- Is using %postname% for permalinks really that bad for performance?
- Getting links to work the same on development and production
- Setting up two separate blogs while using WordPress as a CMS
- Changes to .htaccess not updating the file (old rules still take effect)
- Custom theme navigation
- get permalink and append it
- How to redirect to correct pages after permalink structure change
- Moving local wordpress page to a real server subdomain broke my permalinks?
- Only plain permalinks working
- next_posts_link URL does not include name of custom post type
- Media Gallery Images – safe to change permalink?
- WordPress disallows changing page to a specific permalink
- Custom permalink leads to index page
- How to eliminate permalink prefix in WordPress Multisite
- wp not making CPT permalink / slugs unique
- WordPress 4.4 old permalink redirect
- 404 when going to /blog
- WordPress keeps giving me the wrong permalink
- Permalinks 404 error with HTTPS host
- Mirror content based on URL slug
- Empty permalinks settings in .htaccess
- Rewriting single post url; add_rewrite_rule problem?
- WordPress permalink prefix
- Hierarchy of Subcategories on Permalink (bug?)
- curl problem or permalinks
- How to test custom rewrite rules /permalinks?
- RSS feed link on archives page not working
- Order custom post type posts by custom field with pretty URL
- Show category name in the post URL only for specific categories
- How to disable permalinks to some custom post content?
- post permalinks with dot in url don’t resolve to correct page template
- How to use page jumps to top of banner and page title?
- Permalinks problem woocommerce no separating slash between categories
- how to get permalink
- Change permalink to attachment
- Main blog page works but title says Page not found
- How to translate “Permanent link to” text
- WordPress permalink change causes all incoming links to give 404 errors
- WP as a CMS menu
- Subdomains pointing to a permalink URL
- Change url of page according to my requirements in wordpress
- corrupted URLs – can’t leave starting page
- MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help
- URL gives 404 error of my subfolder site when i change permalink
- home page slug editor missing from WordPress
- Custom optional parameter in page URL
- Posts containing a specific tag and a category in one permalink
- Custom permalink question
- followup to: Page begins with number, WordPress adds 2
- How to search for images and get it’s link?
- Post redirected to page with same name but DIFFERENT permalink
- Why did permalinks setting affect the pages?
- Moved WordPress to other folder (Windows) WAMP = 403 Forbidden
- permalink to single page
- changing permalink gives 404 error for old links
- Uppercase vs. Lowercase page slugs
- How do you intercept the page requests in WordPress?
- Pretty Permalink for Search Queries Not Working
- Automatically prepending ‘#’ to slug in child page permalinks
- Possible to hide parts of the slug from get_template_directory_uri and bloginfo(‘template_directory’)
- How to update permalink on the fly?
- Rename category part the permalink without .htaccess
- Tag URLs load a single post
- Custom rewrites for pages and categories
- Why doesn’t my page know it’s a page (won’t return true for is_page())?
- How to change my URL on intranet
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/