Jump to content


This topic is now archived and is closed to further replies.


How to convert DMS to support Loopbuddy?

Recommended Posts


LoopBuddy, by iThemes, is plugin that overwrites the WordPress Loop using a combination of custom queries and layouts and allows you to customize the content, post-by-post, category-by-category, all with a drag-and-drop interface without having to touch a single line of PHP code.


It's very interesting, but there is still a catch: A WordPress theme needs to support the Loop Standard in order to take full advantage of the flexibility of this plugin...
So a two-step process is needed to make Pagelines DMS compatible with LoopBuddy.


This two-step process consists of:

  1. Adding the necessary support for LoopBuddy into your active theme’s functions.php file
  2. Wrapping the theme’s current WordPress loop with a conditional statement.

No problem on STEP (1), it simply need to add support for the Loop Standard and two PHP functions that define what is happening with the dynamic_loop():


if ( ! function_exists( 'dynamic_loop' ) ) {
    function dynamic_loop() {
        global $dynamic_loop_handlers;
        if ( empty( $dynamic_loop_handlers ) || ! is_array( $dynamic_loop_handlers ) )
            return false;
        ksort( $dynamic_loop_handlers );
        foreach ( (array) $dynamic_loop_handlers as $handlers ) {
            foreach ( (array) $handlers as $function ) {
                if ( is_callable( $function ) && ( false != call_user_func( $function ) ) ) {
                    return true;
        return false;
if ( ! function_exists( 'register_dynamic_loop_handler' ) ) {
    function register_dynamic_loop_handler( $function, $priority = 10 ) {
        global $dynamic_loop_handlers;
        if ( ! is_numeric( $priority ) )
            $priority = 10;
        if ( ! isset( $dynamic_loop_handlers ) || ! is_array( $dynamic_loop_handlers ) )
            $dynamic_loop_handlers = array();
        if ( ! isset( $dynamic_loop_handlers[$priority] ) || ! is_array( $dynamic_loop_handlers[$priority] ) )
            $dynamic_loop_handlers[$priority] = array();
        $dynamic_loop_handlers[$priority][] = $function;

The STEP (2) is more problematic, especially for someone who is NOT a developer, as in my case: it is to locate the WordPress loops in the theme and wrap the loop with a PHP conditional statement that asks whether or not we are using the dynamic_loop() function to override the original loop. The code looks like this:

<?php if (!dynamic_loop()) : ?>
<?php endif; ?>

I suppose it's need to wrap multiple loops in different places. (single, page, archive, 404, etc), but I was not able to do... Is there anyone who can help me?



Share this post

Link to post
Share on other sites



Unfortunately, this isn't really something we can provide support for. However, I don't actually think it will be possible, as DMS uses sections to display the loop and not the standard WordPress method. You will probably want to speak to the developers of the plugin for assistance.

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

  • Similar Content

    • Bleuy
      By Bleuy+
      How can I get support on pagelines DMS? The product isn't that old and my skeleton themes aren't working and I can't get support in the same way? 
    • Bleuy
      By Bleuy+
      I have a number of legacy websites that are running on the above version of Pagelines DMS, where the template has stopped working. I am using a skeleton theme to all of them. What do I need to do to rectify this.
    • Anthony King
      By Anthony King+
      It is with much sorrow that I have to say goodbye to a product that had such great potential.
      There has been no acknowledgement from anybody as to whether or not Pagelines will continue
      or even if they are going to hand it over to someone that would keep the project going. I can't
      keep shelling out money every month to a company that either no longer exists or has chosen to 
      abandoned their customer base. Well it has been a nice 5 years.

    • ideascurator
      By ideascurator+
      Hello Pagelines,   I no longer use pagelines services. I have deactivated the automatic annual payment. But it already charged to my credit card. Since I cancelled my contract before the end, Can I request to refund?
    • Anthony King
      By Anthony King+
      I am wanting to know what the status of the Pagelines Platform.
      I have noticed that there has been absolutely no updates on Platform 5 for over 8 months.
      Please tell me you haven't gone off on another tangent and going to build the next great solution
      and then leave all of us to have to completely rebuild our sites like we did for
      Pagelines, then DMS, then Pagelines Platform.
      I like what you build, but what you need to do is build one product and then make it better, rather than 
      abandoning it and building something else.
      You haven't done anything for so long that even WordPress is providing a warning.
      "Warning: This plugin has not been tested with your current version of WordPress."
      So what is the Status. I mean if I am going to pay a monthly fee for a product, I don't want to pay for one
      that is no longer being supported. You have a great product, I'm not bashing it, I'm just wondering what 
      your next move is because I have business decisions to make for myself, and whether of not this is something
      I should stick with.

      Please be kind enough to respond.

      Thank You,