WordPress.org

Support

Support » Plugins and Hacks » ReciPress » [Plugin: ReciPress] Meta Description

[Plugin: ReciPress] Meta Description

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tammy Hart

    @tammyhart

    In your meta field you can use this function:

    <?php echo recipress_recipe('summary'); ?>

    I haven’t tested this, though.

    Thanks for your help!

    I tried this:
    <meta name=”description” content=”<?php echo recipress_recipe(‘summary’); ?>”/>

    But this outputs the <p summary> tag too! and the second problem is that it echos the summary in the top of my page.

    Plugin Author Tammy Hart

    @tammyhart

    hmmm.. Then I suppose I need to rework how my functions output their information. I hadn’t anticipated this kind of issue. Thank you for your input, I will throw it int he hat for the next update. For now, this should do what you want:

    <?php
    $summary = get_post_meta($post->ID, 'summary', true);
    if(!$summary) $summary = recipress_gen_summary();
    else $summary = $summary[0];
    ?>
    <meta name="description" content="<?php echo $summary; ?>"/>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: ReciPress] Meta Description’ is closed to new replies.
Skip to toolbar