plugin contact form 7 - Why Is Content Entered In Classic Editor Not Displaying on Page?

admin2025-06-03  4

I have a contact page on my website, where I've entered the shortcode for Contact Form 7 in the page editor:

But the contact form isn't displaying on the front-end:

Instead only the content from the Home Page Template is displaying along with the title of the page.

I'd rather not put the code for Contact Form 7 in the Home Page Template because that template is also being used for all of the other pages on the site.

Any idea as to why nothing from the page editor is showing up on the site?

My reading settings look like this:

And I have the WordPress loop in my index.php file:

<?php

get_header();

if (have_posts()) :
    while (have_posts()) : the_post(); ?>

        <article class="post">
            <h2><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h2>
            <?php the_content(); ?>
        </article>

    <?php endwhile;

else:
    echo '<p>No content found</p>';

endif;

get_footer();

?>

Is this problem somehow related to the new WordPress release? I'm having this issue with all of the other pages on the site as well.

Site is live here: /

Your guidance is appreciated!

I have a contact page on my website, where I've entered the shortcode for Contact Form 7 in the page editor:

But the contact form isn't displaying on the front-end:

Instead only the content from the Home Page Template is displaying along with the title of the page.

I'd rather not put the code for Contact Form 7 in the Home Page Template because that template is also being used for all of the other pages on the site.

Any idea as to why nothing from the page editor is showing up on the site?

My reading settings look like this:

And I have the WordPress loop in my index.php file:

<?php

get_header();

if (have_posts()) :
    while (have_posts()) : the_post(); ?>

        <article class="post">
            <h2><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h2>
            <?php the_content(); ?>
        </article>

    <?php endwhile;

else:
    echo '<p>No content found</p>';

endif;

get_footer();

?>

Is this problem somehow related to the new WordPress release? I'm having this issue with all of the other pages on the site as well.

Site is live here: https://refresh.drawyourpets/

Your guidance is appreciated!

Share Improve this question edited Feb 7, 2019 at 9:45 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Feb 7, 2019 at 3:35 HappyHands31HappyHands31 13510 bronze badges 1
  • what version of WP are you using? – Aurovrata Commented Feb 8, 2019 at 10:19
Add a comment  | 

1 Answer 1

Reset to default 0

Shortcodes with hyphens can cause problems and in WP 5, Gutenberg will not accept them, so it is possible this is the issue you are facing. To see if this is the problem, I suggest you install the CF7 Smart-grid extension which replaces the cf7 shortcode with cf7Form, thus removing the hyphens. This will at least strike out this possibility.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748932165a314931.html

最新回复(0)