Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hm it deleted the last part… lets try that again:

    <a href="<?php echo $cat_start_link ?>">First Post!</a>

    Not sure if this is the right way, but it was a way that worked for me to create a link back to the first post of a category:

    at the top of the particular page of interest I created this block:

    <?php
    $cat = 0;
    $p_count = 0;
    $cat_start_link = ”;
    foreach((get_the_category()) as $category) {
    $cat = $category->cat_ID;
    $p_count = ($category->count);

    // combine to get the final link with cat=#&paged=#
    $cat_start_link = get_category_link($cat) . ‘&paged=’ . $p_count;
    }
    ?>

    Then down in the content I created a link something along these lines (styled of course):

    “>First Post!

Viewing 2 replies - 1 through 2 (of 2 total)