• Resolved Salpetriere

    (@salpetriere)


    Is it possible to use the wrapper_class argument to add an additional class to the wrapping <ul>, rather than replacing the existing display-posts-listing class completely?

    I would like to have a consistent class on all my wrapping <ul>s to apply consistent styling across all of them, with unique classes on some instances of the shortcode to change the number of columns for that section.

    This seems pretty intuitive and necessary, am I missing something here?

    https://ww.wp.xz.cn/plugins/display-posts-shortcode/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Just include the base class in the shortcode as well.

    [display-posts wrapper_class=”display-posts-listing my-custom-class”]

    Thread Starter Salpetriere

    (@salpetriere)

    Thanks Bill.

    Thread Starter Salpetriere

    (@salpetriere)

    I’ve just tested your recommendation above and it is not working.

    On the front end the space between the two class names is being stripped out thus concatenating the two class names into a single class name.

    Have you tested this? Does it work for you?

    Plugin Author Bill Erickson

    (@billerickson)

    I’m sorry, you’re right. We’re sanitizing that field to make sure it doesn’t have any special characters that can’t be included in a class, including spaces.

    I’ve made this change to the development version that allows you to separate multiple classes with a space. Now it should work.

    You can download the development version here.

    Thread Starter Salpetriere

    (@salpetriere)

    Thanks for resolving this Bill, I’ll wait for the version to come through the official repo. Any ETA on that?

    Plugin Author Bill Erickson

    (@billerickson)

    I’m waiting until there are enough new changes and improvements to justify an update. I try not to overwhelm users with updates for every minor change since the vast majority of users won’t benefit from the minor changes.

    I’d roughly estimate a new version to be pushed out in the next 1-2 months.

    Thread Starter Salpetriere

    (@salpetriere)

    Ok, in that case I’ll have to download the dev version then. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Use wrapper_class argument to add additional class to wrapper’ is closed to new replies.