Thread Starter
tysto
(@tysto)
I figured out how to add all quotes for a given page…
I replaced the part of the page that gets the content (the_content) with a call to get_the_content plus the quotes shortcode and wrapped that in apply_filters so that the shortcode gets translated.
<?php $content = apply_filters('the_content',get_the_content('<p class="serif">Read the rest of this entry »</p>', '', '').'<br/>[quote|tags='.get_the_ID().']') ; ?>
<?php echo $content ;?>
This works great for getting ALL quotes with a tag that equals the page ID. However, there is no way to limit it, so I can’t use it on my tag or category pages because it would display dozens of quotes (all quotes for all pages with that tag or in that category).
This is such a great plugin, but the all-or-nothing nature of it is frustrating.
Thread Starter
tysto
(@tysto)
Really interested in seeing a multiple quote option added to the next version.
Thread Starter
tysto
(@tysto)
The new version 1.5.1 appears to still not support multiple quotes. You can still only display all quotes for a tag or only 1.
I could call the plugin 3 times, but categories that have few quotes would display duplicate entries, which looks stupid.
Thread Starter
tysto
(@tysto)
Okay, now that the short code supports multiple quotes, I’ve figured out how to add that to a PHP template.
<?php $quotetrio = apply_filters('the_content','[quotcoll tags='.$quotetags.' orderby="random" limit=3]') ; ?>
<?php echo $quotetrio ;?>
This applies PHP filters to the short code, making it execute as if it were being displayed as part of the page. Then it echoes that to the page. “$quotetags” here is the list of tags I want to restrict the list to.