• Jimmy

    (@j_stewart89)


    I’m using the Inline PHP plugin and the documentation is almost nonexistent so was hoping someone might have an example. I can do the following code without a problem but as soon as I try to use HTML coding to modify the output, nothing works. It is as if the query_posts gets flushed from memory when I end the <exec> using the </exec>.

    The code below will display my posts, however, I want to format the posts by adding Author, Date, Comments, etc… nothing I’ve tried will render properly and I believe it is due to the syntax of this plugin but again, no documentation and the links don’t work on the plugin. Thanks in advanced to anyone who can help.

    <exec>
    query_posts('cat=10'.'&orderby=date&order=asc');while (have_posts()) : the_post();
    endwhile;
    </exec>
Viewing 1 replies (of 1 total)
  • i have no experience with this plugin, but from logic, it looks this is just for php code. to get html stuff, you could try and echo it from the php code:
    for example:

    <exec>
    query_posts('cat=10'.'&orderby=date&order=asc');while (have_posts()) : the_post();
    echo '<div class="post"><h3>';the_title(); echo '</h3>'; the_content(); echo '</div>';
    endwhile;
    </exec>

Viewing 1 replies (of 1 total)

The topic ‘Inline PHP example’ is closed to new replies.