• Hi Sebastian.
    Thanks for creating this handy plugin.

    I am wondering how to apply a class to all the divs (not the wrapper though).
    I saw your notes on how to apply a custom class to the first and other divs, but it doesn’t apply it to the last div.

    I edited the php with the class I wanted on all divs, and that works, but I need to use multiple instances of the plugin in the site and they all don’t need my custom class.
    So would rather control the custom classes from the CMS.

    Many thanks

    http://wordpress.org/extend/plugins/divup-content/

Viewing 1 replies (of 1 total)
  • Plugin Author Themeover

    (@bastywebb)

    Hi there,

    You should be able to apply a class to the last div. I just did the following test:

    I entered this dummy content into the WordPress text editor:

    Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page.
    
    [divup class='class-A, class-B']
    
    Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page.
    
    [divup class='class-C']
    
    Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page.

    And it resulted in the following output:

    <div class="divup div-1 div-odd first class-A">
    <p>Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page.</p>
    </div>
    <div class="divup div-2 div-even class-B">
    <p>Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page.</p>
    </div>
    <div class="divup div-3 div-odd mul-3 last class-C">
    <p>Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page. Some content on this page.</p>
    </div>

    Notice how adding class-C to the last [divup] shortcode resulted in the last div having the class “class-C”. if this isn’t happening for you, please could you post a link to the website you are working on so that I can troubleshoot this further.

    Thanks,

    Sebastian

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: DivUp Content] Apply custom class to all divs’ is closed to new replies.