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
- What is considered good practice for registering menu locations?
- Custom theme on multisite has issues with standard loop output
- Can’t extend some core classes
- Change Navigation Bar based on logged in or not
- Adding country tags automatically
- write custom woocommerce templates and forms
- Implement toggle switch for theme options in settings API
- Insert a button on a page with random number generation
- Show comments menu in dashboard only if the site has comment
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Using a variable in is_page(array())
- Trigger popup in a php if/else statement
- Anyway to output the registration form like the login form with wp_login_form()?
- How do I get current page ID in WordPress customizer file?
- Count top level menu items
- Can’t get page content in WordPress
- Customizer: Output default value in Customizer CSS
- Way to querry data (tags) from a wordpress database?
- How to load a template-part based on a url wildcard?
- WordPress does not load page.php, return 404.php
- create a select input with menus created on a custom options page
- Global variable $post returning incorrect object
- How can I load a PHP page without using a Template?
- How can i upload images in an admin page?
- Where to edit the template that is generating the code for dynamic_sidebar left-sidebar in the Understrap theme? [closed]
- Menu — How to add “current-menu-grand-ancestor” css class
- Set the checkbox as checked by default at options page
- Input type search in Menu
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- WP Walker using custom css classes
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Add child pages of parent to navbar PHP
- How can I create a list of page titles from custom meta values?
- Load a page into a div with Ajax
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- Best practice for migration friendly images in posts/pages?
- Change list item content in menu navigation to add a child element with specific class
- Theme Options Page – User Updates Logo
- Converting HTML Template to WordPress Theme
- How to use my style.css file outside of wordpress subdomain?
- How to show part of the_content?
- Page Automatically Generated from Theme?
- Wp-login appears White Screen, Error: Cannot modify header information
- Menu Limitations
- How to remove the cufon script from Dzonia Lite theme [closed]
- get_the_tags() not iterating through for/while loop, but will with foreach
- How can I Add a variable PHP in the Menu Nav
- How to add a php custom page to WordPress
- Sort query_posts for Parent Pages to menue order or the count?
- How to hide all child pages with post_query?
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- Hide categories that are not used in the post type
- Adding an Avatar to the Top Nav Bar
- How do I add custom bulk actions to multiple custom post types?
- Add_action not working in required file of functions.php
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again
- what is the best practice to add new field to an api route
- Grab posts by multiple categories
- Can’t access variable outside for loop
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- add custom link to wordpress media gallery modal
- Need Help Fixing My Iframes [closed]
- Remove metabox from WordPress menu editor page?
- Avoid parallax images hardcoding
- Improve page speed loading using CDN and async or defer attribute
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- How to add an arrow to menu items has submenus
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
- populate form fields in a loop with ajax
- Error in custom php function doesn’t exist