• Okay. So I’ve been trying and trying and I’m at my wits end. I need to to do the following:

    1. Create a sanitized permalink structure that includes the parent category, category and then blog post title. I think that would look something like this:

    /%parent_category%/%category_name%/%post_title/

    Maybe that’s not written correctly. I have based it off of code that I’ve seen floating around in the different codes: the_parent, the_cateogr, parent_cateogry, category_name, ect.

    2. I need to have a link on each page that links to the parent category that is semantic with the above mentioned permalink structure. Here is my code:

    <div class=”see_all_articles”><?php
    // Get the ID of a given category
    $category_id = get_cat_ID( ‘Read More from WebSolvers Orlando Web Desgin’ );

    // Get the URL of this category
    $category_link = get_category_link( $category_id );

    $parent_category = get_category($this_category->category_parent);

    ?>

    <!– Print a link to this category –>
    ” title=”View Articles: <?php $category = get_the_category($category_id); echo $category[0]->cat_name; ?>”>Or See all of the articles related to the topic of <?php $category = get_the_category($category_id); echo $category[0]->cat_name; ?>
    </div>

    Again I’ve scrapped this together from what I’ve read on the other codex. One of my solutions involved simply including the category_id in the permalink structure, but apparently that can’t be done.

    I don’t know how to make these work and I’m going crazy trying to figure it out.

    Please let me know if you have any ideas, suggestions or advice on how to accomplish this.

    Thanks!
    JC

  • The topic ‘Permalinks & Parent Categories’ is closed to new replies.