PDA

View Full Version : CoComment in sidebar only on *some* pages?


chutney
February 25th, 2006, 08:30
I recently added an "Elsewhere" page to my main blog to show Technorati watchlist feeds for my blogs. I'd like to include CoComment on this page too, but as the first thing in the sidebar.

Is there a way to do this in sidebar.php? Is there something to add to is_paged(), or some other method? Or should I just talk myself into putting my CoComment listing in the page's body?

Paul Stamatiou
February 25th, 2006, 08:43
Try putting the coComment code higher in sidebar.php. If not we can do some php conditional stuff.

chutney
February 25th, 2006, 08:48
But won't it just show up on all my pages then? (I just want it to show on the one.)

Paul Stamatiou
February 25th, 2006, 09:10
But won't it just show up on all my pages then? (I just want it to show on the one.)

Oh I didnt read that part..

just off the top of my head, try this.. if elsewhere doesn't work use the page ID

<?php if (is_paged('elsewhere')) { ?>
cocomment stuff
<?php } ?>

lisa
February 25th, 2006, 11:57
Try Nybble's hack... It's a great way to move around the sidebar contents, and create new sidebar blocks.

chutney
February 26th, 2006, 12:26
Paul,

Thanks, but no beans. Tried the slug and the post name ('796'). I'm guessing the is_paged isn't set up for this sort of thing?

chutney
February 26th, 2006, 12:35
Lisa,

Thanks for the heads up, but I haven't upgraded yet. I'd like to sometime, but not just for coComment's sake---too much custom code to change everywhere else. ;-)

Looking at the Nybble thread, it seems it wouldn't do this though. Unless you can specify which pages something appears and doesn't appear on.

lisa
February 26th, 2006, 12:41
You can, and the there is a hack for the previous version of K2 (r163) . You can find it on the old forums at http://binarybonsai.com/forums/comments.php?DiscussionID=44&page=2#Item_35