0

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

enter image description here

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

enter image description here

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:

enter image description here

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.com/

Your guidance is appreciated!

  • what version of WP are you using? – Aurovrata Feb 8 '19 at 10:19
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.