Support » Plugin: Content Blocks (Custom Post Widget) » [Plugin: Custom Post Widget] Custom class or id

  • Hi.

    This is just a request and not a problem. Thanks for sharing this great plugin by the way.

    I think it would be great if it was possible write / add a custom id og class for each block.

    I know an auto generated id is created, but it’s not as flexible as the ability to write my own class / id.

    Just a tip. 🙂


Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Johan van der Wijk


    Hi Vayu,

    I will consider this feature for a future upgrade. Because I don’t want to make configuring the widget more complex I could add a class based on the title of the custom post type in the widget, would that help?

    Hi Johan.

    Thanks for taking this into consideration. 🙂
    I understand. I guess that could be an option, however, not so good if the client should chose to change the title, which is more likely to happen than if there was a class/id input field.


    Hello to both of you.

    I was searching for this exact topic: how to add a custom class, and/or add a unique id, so I can target a re-used custom post block on multiple pages and style them identically, AND have the confidence that when I’m done working on developing on my server, and pass this off to a client, that the ID will remain the same. (will it? have you ever tried that?)

    Adding a class that matches the title would definitely help!!!

    I could also wrap my content in my own html, but that is adding extra mark-up that I’d like to stay away from.

    Hey Vayu,

    I did a further search to just try to filter the custom-post-widget classes, and found this plugin.

    Installed it, it totally works.

    Plugin Author Johan van der Wijk


    Hi Wlanni, thanks for sharing your solution!

    I recently modified this widget to allow for a custom class within the shortcode.

    You can see it here:

    I hope this helps and I would like to see this implemented in a future release.

    Plugin Author Johan van der Wijk


    Thanks for sharing your code, I have included it in the plugin!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Custom Post Widget] Custom class or id’ is closed to new replies.