• Resolved Anonymous User

    (@anonymized-15688342)


    Hi, I tried including custom posts that have a border around it’s content but that css isn’t picked up by insert pages. Instead I noticed that I can just add the css class when inserting a page. My question is if it’s possible to hard code a default string in the “extra classes” text field?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Paul Ryan

    (@figureone)

    You can hook into insert_pages_wrap_content after the plugin does, and modify the markup there (probably do a string replace on class='insert-page replacing it with class='insert-page your-class-here.

    That said, every inserted page wrapper already has the class insert-page, so maybe you can just apply borders to that?

    Thread Starter Anonymous User

    (@anonymized-15688342)

    Cool thanks! Yeah that would have been easier. What I’m trying now is some way of changing the display default to “use custom template” and a pre-defined template, I guess that would be the same method as you described above (sorry, I’m a wordpress n00b)

    Plugin Author Paul Ryan

    (@figureone)

    No worries. Good luck and let us know if you get stuck!

    Thread Starter Anonymous User

    (@anonymized-15688342)

    Well I did get stuck on having it default to use a specific custom template. I would be fine with it overriding whatever option the user chooses and always sets display=”nameOfTemplate.php” in the shortcode, if that would make this easier?

    I also have another question:

    Would it be possible to filter the list of pages and posts to only have it show a pre-specified custom post type and skip everything else?

    Thanks!

    Plugin Author Paul Ryan

    (@figureone)

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

The topic ‘Default Extra Classes’ is closed to new replies.