Support » Plugin: Quotes Collection » [Plugin: Quotes Collection] No way to display multiple quotes from template?

  • Am I right in thinking that there is no way to display more than 1 quote on a page from the template?

    I adore the tagging feature, but I want to display 3 relevant quotes on a tag or category archive page. But I don’t want to have 3 calls to quotescollection_quote. That would would often produce three identical quotes when only that one quote has a certain tag.

    http://wordpress.org/extend/plugins/quotes-collection/

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Really interested in seeing a multiple quote option added to the next version.

    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.

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Quotes Collection] No way to display multiple quotes from template?’ is closed to new replies.