WordPress.org

Forums

Index Widgetized (6 posts)

  1. mythusmage
    Member
    Posted 6 years ago #

    Some plugins ask that you place PHP inside the Loop. However finding out exactly where can get confusing and all

    Were you to widgetize the Loop where would you put the Widget Loop? The Widget Loop being . . .

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?>
    
    	<?php endif; ?>

    What other things would need to be done to widgetize the Loop in addition to the above?

    I'm trying to make things easier on myself and others. Any ideas out there?

  2. Justin Tadlock
    WordPress God
    Posted 6 years ago #

    I wouldn't think putting a widget section inside of the Loop would be a good idea. I'm just thinking that any query for posts (some widgets) inside an already existing query for posts would cause some problems, but haven't tried it.

    This page explains the Loop:
    http://codex.wordpress.org/The_Loop

    Also, your call to the widget section is not a loop at all.

  3. mythusmage
    Member
    Posted 6 years ago #

    Clarification: Only for those functions and calls that would go inside the loop anyway. Such as for emailing a post to a friend.

    BTW, the Widget Loop does the same thing as the Loop, only for widgets. Therefor it is the Widget Loop. You're just jealous cuz I named it first. :p)

  4. moshu
    Member
    Posted 6 years ago #

    That's not a "Loop"; it is a simple conditional code... saying if the function does exist, do something, otherwise do nothing :)

  5. mythusmage
    Member
    Posted 6 years ago #

    Isn't the Loop a simple conditional code? Two simple conditional codes if you want to get technical.

  6. Justin Tadlock
    WordPress God
    Posted 6 years ago #

    Nope. The Loop is a loop, meaning that it runs over and over again. Like a circle.

    A condition is just a check for something. Not like a circle.

    BTW, the Widget Loop does the same thing as the Loop, only for widgets. Therefor it is the Widget Loop. You're just jealous cuz I named it first.

    It's not a Widget Loop. I'll be happy to let you keep credit for naming it.

Topic Closed

This topic has been closed to new replies.

About this Topic