Support » Fixing WordPress » PHP in the loop

  • Resolved mtayla


    I know that I have seen a plugin somewhere that will allow someone to use php in the loop, but I can’t find it anywhere now… A search on wordpress forums turned up everything bout php and the loop but this….

    Does anyone know how this is done, or what plugin I need? Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Chris_K


    well, The_Loop is running in a php page… so most folks just edit the page with the Loop (like, your theme’s index for instance) and add their code.

    What exactly is it that you’d like to do?

    You can add any php you want in the loop, are you refering to actually pasting php in a post?



    I should of clarrified more. I a trying to put some code that would normally go in the sidebar, to include data from plugins such as “Latest From Each Category”, “BDP Referral Tracker”, & “ MyStats” among others. All of this would go into one comprehensive “stats” page with both data comming from tmplate tags n the loop and “external” php.

    An example of what I am trying to pass would be:

    <?php echo dd_last_from_each(); ?>
    <?php naatan_mystats(); ?>



    If it is going on a Page why on the earth do you need the Loop?
    Just create a Page template for it, add all your fancy code, then make a new Page using that template and you are done.

    I don’t see where is the problem.



    Somethings plugins need the loop to display their reports, unless you know something I don’t. It seems like a bigger pain in the ass to make multiple loops to have everything organized, but shit dude, sorry I bothered you.



    Found it. “WordPress PHP Exec Plugin, This plugin lets you execute dynamic PHP code in posts. It masks PHP code before balanceTags, and unmask them afterwards, so it should be safe to use PHP code that has literal HTML tags in it, for example: code which print out HTML.”

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP in the loop’ is closed to new replies.