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

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
    • thirdstonemedia
      By thirdstonemedia+
      I've been fighting with a resolution issue ? Want to use Flick Slider, the site looks great on my monitor but client says she can't see bottom of homes. I believe she's on an old PC using outdated browser/s ... but, she's important to me and I'd like to make this work, on her system. Without asking her adjust her own set-up. 
      I put the Flick Slider inside a container, here ::
      Set the Height of Flick Slider to 50 Base ... I don't know how this works exactly ... there is a Base then a Min ... but, haven't adjusted the Min ::
      Tried using Splash Up, which presents the same issue (she can only see top of home) and she wants several images to rotate on Home page, so not sure this would work anyway ::
      I have tried going into Layout and making the width narrower, and that does make the site narrower, but the homes still don't display in full, on her system. Help ?

      Here are her screen grabs, both desktop and iPad  (dumped the chalkboard background).

      FInally, she said these look great ::
      What am I doing wrong ?? Is there a better way to accomplish making the site look great on any resolution at any size ?
      (Longtime Pagelines-lover.)

    • Suneel
      By Suneel+
      I updated my theme to framework and now can't get rid of this bright blue bar that appears across the top of every page. It says, "A fixed bar that makes it easy to promote important content.", and then a button that says, "Get PageLines".
      I am a novice and need help.
      Thank you!
    • kwaoru
      By kwaoru
      I have been using DMS and pagelines.
      I am facing to a huge trouble with the appearance of one of my page on mobile (smart phones) built with pagelines.
      However I haven’t come to any solutions to organise either edit the appearance of mobile view to look neat or deactivate the responsive function. 
      Now it looks totally messy on the phone...
      1. Is there any way to edit the appearance of the mobile version (responsive theme)?
      2. Is there any way to deactivate responsive function?
      If I could receive support from you to go thorough this process I would be happy to be a pro member. 
      Looking forward to hearing from you.