WordPress.org

Ready to get started?Download WordPress

Forums

Linking the WP-Quote output (1 post)

  1. Tfleming
    Member
    Posted 7 years ago #

    I love the wp-quote plugin, but would like to be able to link to the source of the quote. It would basically be

    "Yadda yadda yadda Quote."
    Source

    Our site is http://www.civicyouth.org/wordpress

    Here is the php function that "spews" the quote onto the page. Where should I stick the right code to make the source a link?

    function wp_quotes_spew($quote, $encloseDiv='id="wp_quotes"', $quoteDiv='wp_quotes_quote', $sourceDiv='wp_quotes_source')
    {
    ?>
    <div <?php echo $encloseDiv?>>
    <div class="<?php echo $quoteDiv?>"><?php echo nl2br($quote->quote); ?></div>
    <?php
    if ( !empty($quote->source) )
    {
    ?>
    <div class="<?php echo $sourceDiv?>"><?php echo $quote->source;?></div>
    <?php
    }
    ?>
    </div>
    <?php
    }

Topic Closed

This topic has been closed to new replies.

About this Topic