• Resolved w4atx

    (@w4atx)


    Sorry if this is not the correct forum…didn’t see one specific to themes.
    New to WP. I just spent about 6 hours (literally) trying to figure out why I could not post either PHP or an iFrame into a Post (with any number of plugins as well as “bare”.)
    I was using the “Basic” theme…finally thought to try another theme! Tried Twenty Sixteen and it worked right off the bat without any plugin needed.
    So… how do I determine if a given theme will act as Twenty Sixteen does in allowing code or knowing which will work properly with either a PHP plugin or an iFrame plugin without just downloading/activating every them available?
    Basic obviously has issues with those kinds of plugins…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this is not an Everything else WordPress topic.

    trying to figure out why I could not post either PHP or an iFrame into a Post (with any number of plugins as well as “bare”.)

    Raw PHP and HTML will never work reliably (if at all) in any post via the WordPress post editor. There’s just too many places for that code to get butchered. That’s not a theme issue.

    What are you trying to insert? You may need to create or use a plugin for that.

    Thread Starter w4atx

    (@w4atx)

    Well, like I said…I’ve spent 6 hours trying every plugin I can find for either iframe or PHP. Cannot get anything to work. Using the following themes allows just straight code…I just don’t like these themes:

    Panoramic
    Twenty Sixteen
    Twenty Seventeen

    Trying to get either one of these methods to work:

    PHP code:

    <!-- HRDLOG.net script start -->
    <div id="hrdlog">www.hrdlog.net</div>
    <script type="text/javascript" language="javascript" src="http://www.hrdlog.net/hrdlog.js"></script>
    <script type="text/javascript" language="javascript">
    var ohrdlog = new HrdLog('W4ATX');
    ohrdlog.LoadByCallsign();
    ohrdlog.LoadLastQso(10);
    ohrdlog.DisableLinks();
    </script>

    iFrame:

    <!-- HRDLOG.net script start -->
    <iframe src="https://www.hrdlog.net/hrdlogframe.aspx?user=W4ATX&lastqso=10&qsomap=&options=search;viewdxcc;disablelinks;" width="100%" height="500" scrolling="auto"></iframe>
    <!-- HRDLOG.net script stop -->

    That’s not PHP. That’s JavaScript and HTML. As long as you’re an administrator user you should have no problem posting these, but you need to make sure you’re putting them in the Text view of the editor, not the Visual view.

    Thread Starter w4atx

    (@w4atx)

    Yes… (Duh!) you are correct. However (for whatever reason) I was never able to get it to work in the “Basic” theme. I switched to Twenty Ten and copied the code exactly as shown and it works. I guess I’ll stick with Twenty Ten! Along the way, I found the “PHP Everywhere” plugin that seemed to resolve inserting actual PHP code.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Theme that will allow PHP’ is closed to new replies.