• I am using custom field & create following functionality but p & br tag not remove,So what can i do?Please help me

    <?php $text = the_field(‘footer_contact’);
    $strip = array(‘<p>’,'</p>’); // search for <p>
    echo str_replace($strip,”,$text);
    ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    not tested but have you tried strip_tags?

    eg:

    echo strip_tags($text);

    if you need to keep a url or bold etc you can add those as exception such as:

    echo strip_tags($text, '<b><a>');

    hope that gives you some help
    Kevin

    Thread Starter jivak

    (@jivak)

    Hi,

    I am using below functionality,But same result <p> &
    not removed

    <?php $text = the_field(‘footer_contact’);
    echo strip_tags($text, ‘<b>‘); ?>

    & secondly <?php get_sidebar(‘left’); ?> & <?php get_sidebar(‘right’); ?> this two sidebar call all inner pages but data not display
    I am using two template left-sidebar & right-sidebar
    How to call or add one template to another template

    Thanks to reply

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove P & BR tag’ is closed to new replies.