• Resolved scamp50

    (@scamp50)


    Hi

    The preview does not work for recipes, I have disabled all plugins (except for WP Ultimate Recipe), and change to a default wordpress theme. I just get the title of the recipe and nothing else on the page!

    Thanks

Viewing 15 replies - 1 through 15 (of 24 total)
  • Thread Starter scamp50

    (@scamp50)

    and a but more info the_content(); does not return any data.

    Thread Starter scamp50

    (@scamp50)

    Also whne I turned on debug = true I got this:

    Fatal error: Call to a member function get_template() on a non-object in /var/www/xxx/htdocs/wp-content/plugins/wp-ultimate-recipe/wp-ultimate-recipe.php on line 268

    Plugin Author Brecht

    (@brechtvds)

    Hi there,

    Do you a “Default Recipe Template” set on the Recipes > Settings > Recipe Template page?

    Brecht

    Thread Starter scamp50

    (@scamp50)

    Yes, as I mentioned I get the error in the preview of the recipe, If I save the recipe and publish then I can view the recipe.

    Plugin Author Brecht

    (@brechtvds)

    Oh, it’s only an issue when previewing?
    Could you try switching to a default theme (like Twenty Sixteen) and see if it works then?

    Thread Starter scamp50

    (@scamp50)

    I already did that – I have tried disabling all plugins (except for WP Ultimate Recipe), and changed to a Twenty Sixteen theme. I just get the title of the recipe and nothing else on the page!

    Plugin Author Brecht

    (@brechtvds)

    Oh right, you mentioned that in your first post. Sorry.
    Does it happen for every recipe?

    Thread Starter scamp50

    (@scamp50)

    All the ones I have tried that are in draft.

    Is there any way I can call and echo the content and the template? I can edit single.php file for my theme for the preview in a recipe post.

    Just so you know we do have:

    function wpurp_recipe_content_loop_check( $ignore_query )
    {
    if( is_main_query() ) $ignore_query = false;
    return $ignore_query;
    }
    add_filter( ‘wpurp_recipe_content_loop_check’, ‘wpurp_recipe_content_loop_check’ );

    Plugin Author Brecht

    (@brechtvds)

    Just using the_content() should be fine. That custom should also not be an issue.
    What version of WordPress are you using?

    Thread Starter scamp50

    (@scamp50)

    the only way I can get content to show is to use: echo get_post_field(‘post_content’, $post->ID);

    and that does not show the formatted recipe.

    Thread Starter scamp50

    (@scamp50)

    PS I am using 4.6.1

    Plugin Author Brecht

    (@brechtvds)

    Using the_content() works when you’re not previewing, so there should be no need to change that.
    I’m not sure what else we can try. I cannot replicate the issue on my end (using Twenty Sixteen) and haven’t heard about this issue from anyone else either.

    Thread Starter scamp50

    (@scamp50)

    is there anyway to have the function Call to a member function get_template() on a non-object in /var/www/xxx/htdocs/wp-content/plugins/wp-ultimate-recipe/wp-ultimate-recipe.php on line 268

    call a default template if it cannot find the one I set?

    I am happy to play around editing return $this->addon( ‘custom-templates’ )->get_template( $type, $template ); to see if I can work out what is happening….

    S

    Plugin Author Brecht

    (@brechtvds)

    What does this return:
    var_dump( $this->addon( 'custom-templates' ) );

    Thread Starter scamp50

    (@scamp50)

    it returns bool(false)

    Anything else I can try?

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Preview not working’ is closed to new replies.