WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Change Wrapper Class via Shortcode (3 posts)

  1. Break5
    Member
    Posted 1 year ago #

    great plugin!

    is it possible to change the wrapper class, not only the wrapper tag for the current shortcode?

    like div.aside oder wrapper_class="aside"

    [display-posts post_type="page" wrapper="div.aside"]

    Page content

    [display-posts post_type="page" wrapper="div.anotherclass"]

    as you may recognize, I want to build a home layout which can be modified via the wordpress text editor instead of changing the template.

    http://wordpress.org/extend/plugins/display-posts-shortcode/

  2. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    Using just the shortcode, no, you cannot customize the CSS classes of the wrapper. But you can create a custom output filter to do so. See some of the examples here: billerickson.net/code-tag/display-posts-shortcode

    Writing the code for you is outside the scope of the free support provided here.

  3. Break5
    Member
    Posted 1 year ago #

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags