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

    (@getmecooking)

    Hi Iain,

    It looks like this recipe is not in a blog post / page so the current code does not cater for this scenario. This is a bug we haven’t spotted before.

    I’ve added a fix for the next version of the plugin.

    In gmc-recipe-template\recipe-template-functions find $gmc_hide_title.

    After that line add:

    if($gmc_hide_title && $tmppost->post_type == ‘gmc_recipe’)
    {
    $gmc_hide_title = true;
    }

    Thanks,
    Kevin

    Thread Starter IainL

    (@iainl)

    Thanks Kevin. I appreciate the response.
    I’ve tried that edit and it’s not working for me. Numerous configurations of that line including a simple: ‘$gmc_hide_title = true;’ in that file and it doesn’t work either. Titles are still shown on the recipes (I would be fine without the logic, just not showing any GMC recipe title would be fine).
    I’m using the premium version of the plugin, but I think this function is in the regular version files and so that doesn’t matter.
    Best,
    Iain

    Plugin Author GetMeCooking

    (@getmecooking)

    Ah, ignore the previous fix.

    Open recipe-template-shortcode.php and change lines 9-11 to:

    <?php $parent_title = trim($tmppost->post_title); ?>
    <?php $recipe_title = html_entity_decode(trim(get_the_title()), ENT_QUOTES,’UTF-8′); ?>
    <h2 class=”gmc-recipe-title <?php echo $gmc_hide_title == ‘Y’ && mb_strlen($parent_title) == mb_strlen($recipe_title) ? ‘gmc-web-hidden’ : ”; ?>” itemprop=”name”><?php echo $recipe_title; ?></h2><div class=”gmc-print-area”>

    It was an encoding / whitespace issue.

    Thanks,
    Kevin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot get rid of Duplicate Recipe Titles’ is closed to new replies.