Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter revdpeter3rd

    (@revdpeter3rd)

    Hi Esmi,

    Thanks for the suggestion. Unfortunately that didn’t work but I managed to put in a small hack that has done the trick. Posted below in case anyone else has a similar problem.

    $categorydescription = category_description();
    if (strpos($categorydescription, "Object")===0) {
        echo '';
    } else {
        echo $categorydescription;
    }

    Thanks again for you help.

    Rev

    Thread Starter revdpeter3rd

    (@revdpeter3rd)

    Hi Esmi,

    Thanks for pointing me in the right direction. I found the below code in my index.php file.

    If I comment out the echo category_description(); it removes the object id#xxx, but unfortunately it stops displaying the category description for my other entries.

    <?php $temp_query = $wp_query; ?>
    <?php get_header(); ?>
    
    <div id="content">
    
    <h1> <?php single_cat_title(); ?> </h1>
        <div class="desc-bg"><?php
            $category = get_the_category();
            echo category_description();
         ?></div>
    <div class="clearfix"></div>

    Do you perhaps have another suggestion?

    Thanks in advance.

    Rev

    Thread Starter revdpeter3rd

    (@revdpeter3rd)

    Hi Esmi,

    Thanks for the reply.

    Could you be a bit more specific as to which code snippet you require please?

    Thanks again,
    Rev

    Hi,

    I am having a very similar issue and I understand where Katana is coming from.

    I have multiple categories each with their own posts. I have set my permalinks and added the true condition. This works great for my categories. By clicking on a post in my category I can navigate back and forth through any of the other posts within that category.

    My problem lies with my homepage. This displays all my posts from any categories in chronological order. When I click into one of these posts you would expect to be able to navigate through them as you see them on the home page irrespective of their category. Unfortunately once you click on a post from the homepage you can only navigate through the category that that post was created in.

    Like Katana, this solution will have to do for now.

    I do have a quick question though regarding the IF statement that you provided above. What the correct condition be if you were not in any category (ie you are on the home page)? I would like it to look something like this:

    <?php if (ON HOME PAGE){ ?>
    			<div class="alignleft"><?php previous_post_link('&laquo; %link','%title',FALSE,'') ?></div>
    			<div class="alignright"><?php next_post_link('%link &raquo;','%title',FALSE,'') ?></div>
    			<?php }
    
    			else { ?>
    			<div class="alignleft"><?php previous_post_link('&laquo; %link','%title','TRUE','') ?></div>
    			<div class="alignright"><?php next_post_link('%link &raquo;','%title','TRUE','') ?></div>
    			<?php } ?>

    Thanks in advance,
    Rev

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