You need to include a loop to retrieve the page content. Something like:
<div id="primary" class="site-content">
<div id="content" role="main">
//BELOW HERE
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
//ABOVE HERE
</div><!-- #content -->
</div><!-- #primary -->
More on Page Templates:
Possible Tutorial Starting Point
And Page Templates from the WP Codex on Page templates:
page.php — If a specialized template that includes the page’s ID is not found, WordPress looks for and uses the theme’s default page
template.
So if you haven’t assigned anything in the admin, and no more specialized templates exist, your page.php file is being called.
Related Posts:
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- How can I add a class to a single menu item?
- Can’t load WP function into external function
- Custom category code not showing all posts
- Multiple WordPress Menus that will only display all pages
- Populate editor with some content of a page with a page template
- get_the_title() gets printed out twice
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Parsing Menu Items and Blog Posts
- Automatically add images to a menu
- wp_nav_menu not working correctly in my underscores theme
- How to modify mobile nav menu text in theme
- Output only links using wp_nav_menu()
- Get css class of menu item in custom menu structure
- How to add aria role and schema markup to custom walker container
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why in this WordPress theme I can’t see the Main Menu?
- Toolbar Hidden in a Virtual Page
- How to tell if a user has gone in and created a menu
- Remove the Tag from wp_nav_menu
- When I click for the redirect link it is showing the content of index.php instead of single_assignment_page.php
- Create a custom theme-specific page, invisible in the admin-panel?
- Adding Media button to only pages
- Sending the reset password link programatically
- start_lvl Ignored in Custom walker_nav_menu
- Any guides on creating custom admin pages?
- wp_delete_auto_drafts() deletes links in menus
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- Check if a menu is empty?
- Walker class: Problems with understanding how walk() method can be called without error
- How can I access the “description” of a menu item?
- Design view breaking on Pages
- Adjust the results quantity for Search Results page pagination
- Is it possible to use the featured image of a page as a css background without inlining?
- How do I translate this string – PHP syntax question
- Site Health : An active PHP session was detected
- How to display recent posts on home page with custom HTML
- items_wrap not working
- using add_action for a header hook that has an additional parameter
- Run a filter when a walker runs
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Set the checkbox as checked by default at options page
- Input type search in Menu
- populate form fields in a loop with ajax
- Error in custom php function doesn’t exist
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Create Page To Count Comments For Each Post In WordPress Site
- What does this mean in wordpress? Easy question
- WordPress Customizer Default Image
- Theme’s Options Page included with require_once *.php in functions.php not visible anymore
- How to show an entire post content and not also the excerpt?
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- How to add the sidebar to all the pages except the home page? [closed]
- Header not properly displaying on archive.php
- How to display different submenus?
- Removing “Powered by” footer using child theme PHP [closed]
- Get parents child pages
- Unable to access WordPress functions from functions.php
- Removing custom sort order from admin page listing
- Why can’t I add a custom image in my navigation?
- pass html code to worpdress
- Commas in Tag Cloud
- Parent/Child pages
- security concerns if using html data-* attribute for l10n?
- How do you create a custom category widget that you can style?
- Adding an Anchor Link to a wordpress menu using WPBakery Page Builder
- How to change basename url for wp-admin?
- url not using query string no longer working
- Not able to remove caption shortcode from the content
- Weird fonts showing which are coming from database
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- How to have different headers.php files based on the display page
- wp_get_nav_menu_items() with ACF
- How to switch between two primary menus (programatically0
- Used a code to revoke some dashboard menus for my contributors but for some reason it’s revoked me access to the editor [closed]
- Proper use of Output Buffer for a whole php clas
- How to give custom roles the capability to edit one Menu instead of every Menu
- Primary navigation menu with timed items from custom post type
- loading a php file to a specific page id
- CSS loading as empty file in Custom Theme
- How can I customize a WordPress theme before it’s downloaded?
- How limit the width of a fixed menu-bar on scroll?
- Two theme locations for two menus, but only one is showing up
- Trying send mail from Theme page
- Contact form field in wordpress menu
- How to call a certain object/menubar in a PHP file
- How can I change the title of the Home link in the navigation bar?
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to change the menu color
- Nav Menu Display
- Shortcode working in page.php but not in category.php in wordpress
- ACF: Echo page title when checkbox is checked
- Adding a Sub Menu Options Page WP Backend Menu. Whats wrong with my code?
- How can a ‘scripts’ directory be hooked into wp_head();?
- WP and Laravel integration (Updated) [closed]
- Social Sharing Buttons in Recent Articles List
- Font Awesome Icons as squares [closed]