[resolved] Conditional Statement for Breadcrumbs (4 posts)

  1. sarahfrantz
    Posted 4 years ago #

    Just a quick question, I want to show a specific link instead of breadcrumbs on a specific page.. but I don't have a set ID for the page (which I would normally use if I was doing this... can you use an absolute url?

    for example, I want to do this:

    <?php if ( is_page('http://www.mypage.com/subdirectory/page')) { ?>
    <a href="http://www.happydaycorp.com/catering/menu">Menu</a>
    <?php } else { ?>
    <?php wpsc_output_breadcrumbs(); ?>
    <?php } ?>

    Any suggestions?

  2. Peter_L
    Posted 4 years ago #

    to get your post ID, go to your wp dashboard, pages
    hover over the page you want, look bottom left in your browser window and you'll see a url.
    ...post.php?post=12&... the number after post= is the post ID.

    You could also use the page slug or title

  3. sarahfrantz
    Posted 4 years ago #

    its actually not a page though, or technically a category.. is part of a products-page category... if that makes sense.

  4. Peter_L
    Posted 4 years ago #

    is_category then in the category.php file

Topic Closed

This topic has been closed to new replies.

About this Topic