0

I am having some difficulty displaying post data. I am entering my PHP into a PHP element of my front end page builder.

All I want is the post title wrapped in an H4 tag followed by the post content.

When I enter this on its own it works; <?php echo get_the_title(); ?>

And when I enter this on its own it also works: <?php echo get_the_content(); ?>

But when I add both snippets into the same PHP container it gives me a 404 error on the frontend.

Can anyone please help with this?

Thanks

  • ¿Are you in a loop? ¿Can you show us the entire code? – Carlos Faria Jan 27 at 20:25
  • 1
    <?php the_title( '<h4>', '</h4>' ); the_content(); ?> might work. – Sally CJ Jan 27 at 20:26

Your Answer

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

Browse other questions tagged or ask your own question.