Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Hide a Post but have a Link to it in Sidebar (http://forum.bytesforall.com/showthread.php?t=6744)

treeplant Apr 16, 2010 07:38 AM

Hide a Post but have a Link to it in Sidebar
 
I want to hide a Post so it does not show up in my posts or blog. But I want a link to it in the sidebar.
If I make it private, the link doesn't work. Yes I can do this with a page (hide the page in Atahualpa options), but it needs to be a Post, not a Page. How do I do this? I don't see an option to hide a Post in Atahualpa.

Thanks

juggledad Apr 16, 2010 03:51 PM

you could put some code in 'The LOOP' to check for that post ID and just skip it. This shouldn't effect any of the widgets, just the center column

treeplant Apr 16, 2010 07:29 PM

Thanks for the reply. I really don't know what code to put there.
Any suggestions?

Thanks,
Norm

juggledad Apr 18, 2010 05:33 AM

you would need something like this to the begining of ATO->Style & edit CENTER COLUMN->The LOOP
HTML Code:

<?php if ( (get_the_ID()!= '106') or
        ((!is_front_page()) and  (get_the_ID() == '106') )
      ) { ?>

and
HTML Code:

<?php } ?>
to the end.

Make sure to change '106' to the post id you are refering to.

treeplant Apr 18, 2010 11:32 AM

Thanks! I'll try that.

paulae Apr 18, 2010 01:52 PM

There is a plugin called Hide Post. I wonder if you could use that, and then just make a text link in the sidebar to the post.

treeplant Apr 18, 2010 07:22 PM

Will try that first. Sounds easier.
Thanks!


All times are GMT -6. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.