WordPress.org

Support

Support » Plugins and Hacks » WP Ultimate Recipe » [Resolved] Recipe Pages Show Blog Header instead of Recipe Header

[Resolved] Recipe Pages Show Blog Header instead of Recipe Header

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author BrechtVds

    @brechtvds

    Hi again,

    I think you can solve this with a custom template for recipe post types.
    You’ll have to create a file called single-recipe.php which is the same as single.php but with the changed header.
    There’s some more info over here: http://codex.wordpress.org/Post_Type_Templates

    Let me know if this works!

    Kind regards,
    Brecht

    Instead of creating a whole new template, I added this code to the single.php file (below). If the post is in the News category (blog), then it displays the “News” title, otherwise it displays the “Recipes” title. I realize this code will have to change if we add more post categories.

    <?php
    if (in_category(“2”)) {
    _e(‘News’,’wpex’);
    } else {
    _e(‘Recipes’,’wpex’);
    }
    ?>

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Recipe Pages Show Blog Header instead of Recipe Header’ is closed to new replies.
Skip to toolbar