WordPress.org

Ready to get started?Download WordPress

Forums

links direct to wrong page (1 post)

  1. dkjuhbteldnkbghvdogfksf
    Member
    Posted 6 years ago #

    I am doing volunteer work for a school blog and have re-worked their theme, but now the links won't work right.

    The site is on my development server and has the same issue there. http://www.microrates.com/wp/.

    On the front page there is a post, with a link to other posts in the category.

    Look at http://www.microrates.com/wp/ and then the get more stories under the news cat...it goes to the wrong place, as do the nav links. Go directly to what I thought the right link is and it will show correct in the address in the browser, but it is still showing the wrong cat (http://www.microrates.com/wp/?p=1 is really showing p=7)

    The “Get More in News” link on the front page is from this:
    <?php query_posts('category_name=news&showposts=4&offset=1'); ?>

    The name ‘news’ is cat #1, but it takes you to:
    http://www.microrates.com/wp/?p=7 which is the cat 7 page.

    Selecting it from the nav ‘NEWS’ (http://www.microrates.com/wp/?cat=1) gives you a blank page...the post is not there...but it is showing on the front page!

    The full cell is:

    <td width="50%" valign="top" style=" padding-left: 33px; *padding-left: 30px;"><center> <img src="./wp-content/themes/RiderNews/images/newsTitlenew.gif" width="400" height="25" border="0"> </center><br>
    <?php query_posts('category_name=news&showposts=1'); ?><?php while (have_posts()) : the_post(); ?>
    <!-- Print Title -->
    <div class="entrytitle2">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?> </div>
    <!-- Print Print & Email Icons -->
    <!--<table width="100%"><tr><td align="left"><?php if(function_exists('wp_email')) { email_link(); } ?></td><td align="right"><?php if(function_exists('wp_print')) { print_link(); } ?></td></tr></table>--><!-- Print Article --><?php the_content('Read The Full Story... '); ?><?php endwhile; ?>
    <!-- GET MORE STORIES -->
    <?php query_posts('category_name=news&showposts=4&offset=1'); ?>

    </td>

    I made no change here...the school's online version works.

    Permalinks are stock...there isn’t anything in the htaccess except Front Page stuff...and all other themes or permalinks work fine...just not this theme.

    I found something else weird...I set up a "current" class for the navs...but it thought it was on 2 different pages at the same time. I put in a breadcrumb plug-in and it even thought it was on 2 different pages when on the front page. Once I started fixing all the errors that were creating a messed up display, stuff changed. I re-did the nav code to this:

    <li <?php if( (is_home())&&!(is_paged()) ){echo 'class="current"';}?>>Frontpage
    <li <?php if(in_category(1) || is_category(1)){echo 'class="current"';}?>>News
    <li <?php if(in_category(4) || is_category(4)){echo 'class="current"';}?>>Features
    <li <?php if(in_category(3) || is_category(3)){echo 'class="current"';}?>>Entertainment
    <li <?php if(in_category(5) || is_category(5)){echo 'class="current"';}?>>Opinion
    <li <?php if(in_category(6) || is_category(6)){echo 'class="current"';}?>>Sports

    And it worked right at one point, but then as I fixed the rest of the page it stopped working again.

    This is free work for a school so I'm posting this here so maybe someone can help them get this working.

    I figured it was seo permalinks, but with them gone the issue is still there. The stuff I fixed were alignment errors, div tag stuff, IE vs. FF issues, etc. Obviously if it can’t be sure what page it is on, some kind of conflicting call must be somewhere...I think.

    I know I could rebuild it from scratch to look the same and work right, but that is tons of work.

    Any ideas? I can give access to someone who wants to help. I feel sorry for them and have spent hours trying to figure this out and I’m missing something here. I provided them with design fixes but they can not figure out how to implement this. There is no budget for this and I am just trying to help them out...any body want to help?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags