Help PixTheme
  • Home
  • Theme Documentation
  • Forums
  • Log In / Sign Up

Community Forums

Please use one topic for only one question.

Please use one topic for only one question.

Please use one topic for only one question.

Homepage/Forums/iRepair – WordPress Theme/PHP echo

PHP echo

This topic is: not resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • 8 years, 9 months ago Anonymous

    Hello,

     

    I have a (stupid) question.

     

    In php code I placed some html with PHP echo

    like this

    We deliver smartphones <b><?php echo the_content(); ?></b> within one day.

     

    The output works, but as the content goes in the page, it gives an whitespace/line break, like this

    We deliver

    REPAIRING

    within one day.

    How to remove the linebreak before and after the <span style=”line-height: 1.5;”><?php echo the_content(); ?></span><span style=”line-height: 1.5;”>. I like to show it like this</span>

    We deliver REPAIRING within one day.

    Kind regards,

    Laura

    8 years, 9 months ago Support team
    Keymaster

    Hi. Try replace <?php echo the_content(); ?> with <?php echo esc_html(the_content()); ?>
    Thanks.

    8 years, 9 months ago Anonymous

    poHi Alexey,

    Thanks for quick responding. Unfortenately it is the same. It is the description.php in woocommerce wich I placed in the child theme folder.

    Any other suggestion?

    Kind regards,

    Laura

     

     

     

    8 years, 9 months ago Anonymous

    Hi Alexey,

    I finally found a solution.

    <?php echo $post->post_content; ?>

     

    Did it for me. Thanks.

    Laura

     

    8 years, 9 months ago Support team
    Keymaster

    Ok thanks

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Already a member? Sign In

Log In
Register Lost Password

The Best Thanks

© 2013-2024 PixTheme Studio. All Rights Reserved.