Wordpress Page.html - Getting the page content to show

Good day All,

I hope this is a simple query.

Currently I have a wordpress theme with all the pages as per the tutorial videos, however I am stuck now as they do not explain how to edit the “page.html” file.

There are 3 pages created in my wordpress: “Contact Us”; “Products”; “Sample Page”. These display correctly in the menu and once you click on them the “Page.php” is activated as expected, however the “content” of the page is not displaying.

I have 2 elements on the page:
Page Title:

<?php wp_title(); ?>

Paragraph:

Should be the content of the page created

I am having trouble with the paragraph section.
This is my current code snippet: https://pastebin.com/wu9zLbce

Please help me with how to get the page created in wordpress to display here.

Hi @zero2xiii have you read this article? (http://docs.pinegrow.com/how-to-use-wordpress-pages-and-posts-templates/) It might be of help

HI Rob,

I have had a read through it and I have applied the “Define page template” property. However the page content is still not displaying. The “P” section’s content is not being replaced by the page’s content. The correct file is used by wordpress.

How do I get the page content to display here?

Hi, did you ever figure out how to get the content of the pages to show?

@zero2xiii and @cmoore Please, go to http://docsbeta.pinegrow.com/how-to-get-woocommerce-to-run-in-a-wordpress-theme-created-with-pinegrow/#bonus-files and download the sample theme.

There, you will find the theme from the video tutorial and you will be able to analyze the page.html template.

Note: I don’t remember if we cover the page.html template in the video tutorial but I guess that the loop is missing in your template.

@Emmanuel I must be missing something. I have a static page for the home page and couldn’t get it to work. But, I also just purchased the PG WP Starter Theme to see what it’s doing differently. I have text in WP for the Home page. I have created and index.html and page.html and exported the theme and the text on the Home page is still not showing???

I also took a look at the example you showed, but didn’t see anything different from the starter theme.

@Emmanuel, Here is the page.php file that gets created from the PG WP Starter Theme:

 <?php
get_header(); ?>

<section>
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-9">
                <?php if ( have_posts() ) : ?>
                    <?php while ( have_posts() ) : the_post(); ?>
                        <?php get_template_part( 'template-parts/content-page' ); ?>
                    <?php endwhile; ?>
                <?php else : ?>
                    <p><?php _e( 'Sorry, no posts matched your criteria.', 'pg_wp_starter_theme' ); ?></p>
                <?php endif; ?>
                <?php if ( comments_open() || get_comments_number() ) : ?>
                    <?php comments_template(); ?>
                <?php endif; ?>
            </div>
            <div class="col-sm-3">
                <?php if ( is_active_sidebar( 'right_sidebar' ) ) : ?>
                    <aside id="main_sidebar">
                        <?php dynamic_sidebar( 'right_sidebar' ); ?>
                    </aside>
                <?php endif; ?>
            </div>
        </div>
    </div>
</section>                

<?php get_footer(); ?>

Given this, the text in WP for the Home page shown below doesn’t show up.

The question is: When you use the starter theme OR the theme package I have provided and you export to a WordPress theme and you activate the theme, do you get the content of the page ?

If yes, then, there is an issue somewhere in your theme and without having a look at your whole project, it’s going to be difficult to help > support@pinegrow.com

Cheers.

If I use just the starter theme, not change anything and export it after creating the index.html and page.html. The content does not show on the page. I’ll contact you on support. :slight_smile: