I would strongly suggest you use a WordPress page template. At the top of dashboard.php
:
<?php
/**
* Template Name: Dashboard
*/
Now create a page called “Dashboard” and assign it the dashboard template.
This way you’re not loading WordPress yourself (nearly always bad) & WordPress & all your plugins will function as normal (creating custom endpoints in WordPress that don’t ultimately map to a loop/post object can hit a lot of problems as vast swathes of the frontend assume they do).
Related Posts:
- Rewrite Rules to custom template
- How to access .html file that’s located in the theme folder from the browser?
- Creating custom URLs with template to fetch external JSON
- How to change the default registration email ? (plugin and/or non-plugin)
- How can i change email template for new user
- Enable page templates. How?
- Is it possible to override the result of get_template_part()?
- Prevent comments_template() to load comments.php
- Page editor missing Templates drop down
- Custom templates folder
- How to Rename a Template File?
- get page templates
- Load entire NextGEN gallery from single thumbnail?
- Preventing index.php?category_name=something from redirecting
- stop blog page from using index.php?
- How to assign a class to a page with a custom template?
- Proper Javascript Implementation
- Guest author’s post not display in author template
- How to apply a custom template for posts by default?
- how to create template path for external (include) .js file
- How to Increment ID value within ACF Repeater Field Loop
- Is there a way to check which template file is being loaded, if it is not a page template file?
- How to remove wp_link_pages() from template
- How can I get WP to use templates in lower-level subfolder?
- how to make a home page for wordpress custom theme
- home.php not loading
- Generate Catalog Of Posts Based On Template
- Extending body classes in front- and backend
- How to get the most recent modified date of anything in the footer of my site?
- How do I find the directory of a page template?
- Is there a way to set different post templates for parent posts and child posts in the same post type?
- Why write markup for index.php?
- How to remove the Template drop down, but keep Parent and Order
- Search results when none found – stay on page they were on
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- How can I hardcode template selection?
- Changing layout programmatically
- How to identify which template WordPress’s default search-form retrieves in my theme
- A case for Hierarchical Custom Posts
- How to use same page template if post status other than ‘publish’?
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- Flush Rewrite Rules when new site is created on network
- How do I override the search template in a plugin?
- Possible to have one template call different sidebars for different pages?
- Is there any way to write custom HTML is some .php file and then call it wherever necessary?
- How to redirect my custom template page to content-none.php if no posts found?
- Get URL of current post but not the page number
- Is template name always same as directory name?
- Single Post Breadcrumb not linking back to Custom Post Type Index?
- Form post to WordPress page = wrong template
- How can I add text to a specific ‘Edit Page’?
- Automatically use specific template to load subpages
- how can I add a “read more” tag directly in the template?
- No three-columns template in TwentyEleven?
- Can’t split the_title() by white space
- Not so common HTML transition to wordpress issue
- Differentiation between index.php and page.php
- Undefined get_header function
- Single-page.php template file name not shown
- WordPress custom template not showing in the list of available templates
- How to create new template page and template-parts in wordpress theme [closed]
- Assign Specific Template for Custom Post slug
- How to display custom post type?
- Pagination issue with tag.php
- How are the HTML classes generated?
- Page Template with Sidebar Naming Convention?
- Adding text to the footer of each post based on tags or categories
- Blog page won’t show Blog template
- How can I abstract code out of a template by using functions.php
- Make Permalink go to specific template
- WordPress function.php on ZendFramework CMS
- Site Title appearing twice on live site
- Give user option to select full post index page or excerpted index?
- the_post() in RSS feed
- how to change already posted blog to custom template wordpress?
- WordPress change title with custom dynamic
- template with multiple post loops for multiple widgets [duplicate]
- Random home page at each refresh between array of page IDs
- Do not trigger page 404 on custom template
- Print different parts of content in template
- How can I pass a variable from a template to header.php of a theme
- Page Template Selector Error
- Change Page Template Based on URL Rewrite in WordPress
- I want to display all related posts for a selected tag in WordPress
- How can I modify this code to include the parent?
- WordPress Child Theme Template auth_redirect wrapper
- Show a custom template, no matter the page being viewed, if the user is not logged in
- Is this the best way to complete disable category archive pages?
- printf, translation and the_author_posts_link()
- Tag Posts showing in wrong places
- Problem with custom page template and permalink
- Index template and Home page
- front page won’t change templates
- Including 2 Negative Is_Template Conditionals in header.php [closed]
- Add custom card template to masonry layout using Essential Grid [closed]
- Where is the general html template file?
- How to limit block activity (insertion/deletion) to inside of a Block Template on the Admin Screen?
- How to change post template
- WordPress template restored by mistake
- Unload templates; disable parent Template Parts using only “theme.json”