I’d like to know if there’s a way to edit/add content to a custom page template using the WordPress text editor.

I created a page template with the code below and was aiming to display some introductory information at the top of the page (or basically any information I put in via the WP text editor) and then at the bottom of that section there would be an area that would display posts from a specific category.

But I’m not sure of how to make the WP text editor add content to the template I made. I feel like some code is missing or that I’m doing something wrong.

Any help is appreciated, thanks.

Also the theme being used is Grace (by sitechurch).

~ Adrian

Template Name: Home Template

get_header(); ?>
<main class="<?php echo omega_apply_atomic( 'main_class', 'content' );?>" <?php omega_attr( 'content' ); ?>>
    do_action( 'omega_before_content' ); 

if ( have_posts() ) :       

    do_action( 'omega_before_loop');    

    /* Start the Loop */ 
    query_posts( 'category_name=current-sale');
    while ( have_posts() ) : the_post(); 
        <article <?php omega_attr( 'post' ); ?>><div class="entry-wrap">
            do_action( 'omega_before_entry' ); 
            do_action( 'omega_entry' );
            do_action( 'omega_after_entry' ); 

    do_action( 'omega_after_loop');         

else : 
        get_template_part( 'partials/no-results', 'archive' ); 

    do_action( 'omega_after_content' ); 
</main><!-- .content -->
<?php get_footer(); ?>

Read more here: Adding content to a WordPress Custom Page Template using WordPress Text Editor


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: