WordPress.org

Ready to get started?Download WordPress

Forums

Problem inserting PHP with exec php and another plugin (4 posts)

  1. emergentinc
    Member
    Posted 5 years ago #

    I use the datafeedr plugin for a site of mine and also use exec php so I can insert PHP into pages and posts. Everything works fine until I try to insert PHP into an HTML module within Datafeedr.

    I have disabled the visual editor, but when I try to post this code:

    <?php
    $keyword = the_title("", "", false);
    $text .= '[phpbay]' . $keyword . ', "20", "", ""[/phpbay]';
    echo phpBayPro($text);
    ?>

    It ends up looking like this after I save it.

    <p><?php<br />
    $keyword = the_title("", "", false);<br />
    $text .= '[phpbay]' . $keyword . ', "20", "", ""[/phpbay]';<br />
    echo phpBayPro($text);<br />
    ?></p>

    At first I figured it was because it is with a WYSIWYG, but I have made sure that I was in CODE mode rather than VISUAL and have now just disabled the visual editor altogether.

    Any ideas of what I should try?

  2. cpreston
    Member
    Posted 5 years ago #

    I'm having the same exact issue. Will let you know if I find anything

  3. Konstantin Kovshenin
    Member
    Posted 5 years ago #

    Write it in one line. If it gets too complicated use require() or include(). There were also hacks for turning off the auto-linebreak feature in WordPress, but that's definitely not a good idea.

  4. wgstjf
    Member
    Posted 4 years ago #

    Did anyone get the exec-php plugin working in the pages section of datafeedr? I have made sure that I do not have any other formatting in the content. It seems that the exec-php plugin just doesn't execute on the datafeedr content...

    Any help greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic