• @robotastic – First off, your plugin is really good! I’ve been enjoying it for a while now and its incredibly simply to both understand and to add new recipes! Thanks a lot!

    I have one question – Is it possible to merge the recipes with the regular posts? Right now, if I go to /recipes/ everything is nice and fine – But I don’t see a point in inserting the recipes into posts, they are fine as they are.

    I would like to have the category recipes added to the site, as regular posts! That would be awesome! If you visit my site – Cooking with wine, you’ll notice users are able to post their own recipes. While those user generated recipes don’t have to be using the plugin or the Google Plugins, it would be nice if they would seamlessly merge with the rest of the recipes I’ve already inserted using your plugin.

    Otherwise I have to manually make new posts for every recipe, and put a no-index on the category your plugin has created (to avoid Google not thinking I’ve got the same recipes on two places). It’s a bit of work… Since I’ve got 500 recipes ready ??

    https://www.ads-software.com/extend/plugins/recipe-schema/

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

    (@robotastic)

    Thanks! That is great to hear. It should be totally possible to have the recipes show up as their own posts. The Recipes are just extended Posts. Sorry I didn’t get back to you sooner – WordPress doesn’t let me know when new people post.

    Try going to /wp-content/plugins/recipe-schema/recipe-schema.php

    Try setting the following line to false;
    570 ‘exclude_from_search’ => true,

    You might have to change something in you theme to loop through posts and recipes.

    – Luke

    Thread Starter hatherley

    (@hatherley)

    Hey Luke!

    I tried, but no success. Is there anything else you can think of, which might help me?
    Thanks for taking the time ??

    Slightly off-topic, but the above line helped me to display the taxonomy archives for recipe_type and cuisine (which were previously not showing any associated recipes).

    As far as Valdemar’s problem goes:
    In addition to the above you need to tell WordPress to include the ‘recipe-schema’ Custom Post Type in the loop:

    function recipes_in_home_loop( $query ) {
     if ( is_home() && $query->is_main_query() )
     $query->set( 'post_type', array( 'post', 'recipe-schema') );
     return $query;
     }
     add_filter( 'pre_get_posts', 'recipes_in_home_loop' );

    If you also want the recipes to appear in author and date archives you will have to expand the if clause along the lines of if ( (is_home() || is_author() || is_date()) && $query->is_main_query() ) (untested)

    Luke, would it be possible to set ‘exclude_from_search’ to false in a future update of the plugin, so taxonomy archives work out of the box, or is the setting intentional?

    Great plugin by the way!

    Thanks,
    Axel
    PS: Thanks to https://wpmu.org/how-to-add-custom-post-types-to-your-home-page-and-feeds/ for the above snippet!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Merging the recipes with posts!’ is closed to new replies.