Chapter Quotes for WordPress Posts Revisited
A few months ago, I wrote a post about adding chapter quotes to your WordPress posts. Here I’ll show you another way to add them to posts without them showing up outside of the single-post page, and this method doesn’t require any changes to your theme files.
Last week, I released a WordPress plugin called Conditional Shortcodes. The plugin gives you shortcodes to let you include or exclude parts of you post depending on the context in which it is being shown.
You see it coming, right? Yes, there is a shortcode for including things only when just a single post is being shown. It is the [is_single] shortcode and you could use it for chapter quotes like so:
Add in the css discussed in the other post, and you’ve got chapter quotes that only appear when showing single posts. No theme modification. No custom fields. Much easier, no?


Leave a comment