WordPress.org

Ready to get started?Download WordPress

Forums

I can't run PHP scripts in wordpress pages (2 posts)

  1. afam4eva
    Member
    Posted 2 years ago #

    I installed the exec-php plugin but whenever I type php scripts, it becomes enclosed by the paragraph(p) and the break(br) tags. How do I solve this?

  2. vjpo
    Member
    Posted 2 years ago #

    This is work of WP auto paragraph function.
    Learn more about wpautop and wptexturize functions.

    To disable the autop completely in content paste this code to functions.php
    remove_filter( 'the_content', 'wpautop' );

    for more flexible settings check
    http://wordpress.org/extend/plugins/raw-html/
    http://wordpress.org/extend/plugins/ps-disable-auto-formatting/
    http://www.wpbeginner.com/wp-tutorials/how-to-disable-automatic-formatting-in-wordpress-posts/

    there is another one good plugin to run PHP via [shortcode]
    http://wordpress.org/extend/plugins/shortcode-exec-php/

Topic Closed

This topic has been closed to new replies.

About this Topic