Jan 08
New Plugin: ShowOnFrontPage
Sometimes I find myself wanting to hide a post from the front page. I find that WP is so quick to post to, that I’m often tossing things into it via the “Press It” bookmarklet, but I don’t always want the whole world to see them front and center
So I created the ShowOnFrontPage plugin to remedy it. It will add a checkbox to the Post Status field called “Show on front page” which will be checked by default for all posts. Uncheck it and voila no more post on the front page
Don’t worry, it will still show up under whatever category you posted it to…
Please please please test carefully and abundantly
I believe that it requires 1.3+, so please try it with that version before getting too upset!
Update (8/12/05): Help! It seems the plug-in is not working correctly on releases after 1.5, including. If anyone can help me update it, I would be most appreciative. My new job and hyperactive kid are leaving me no time at all!
If you are a plugin author that knows what might have changed in the loop structure, let me know….
Update (9/14/05):
Super user Steve Carson updated the plugin to 0.3.1 and hopefully fixed compatibility issues and a bug or two. Feedback welcomed on the updated plugin!Update (1/16/08):
Finally noticed and updated per the comment by Viktor below. Now posts no longer disappear when moderated comments are approved. Yikes![]()
Download the plugin here: ShowOnFrontPage Plugin
(P.S. I’ve added my Amazon wish list to the sidebar, and a PayPal donation link below. I expect nothing, but would be delighted by anything
)


January 9th, 2005 at 12:22 am
this is definately a needed plugin! I want to try! THANKS!
January 10th, 2005 at 5:28 am
Just what I’ve been looking for - Wordpress is great but its no CMS (yet!)
January 10th, 2005 at 6:14 am
I hope it doesnt become a full CMS. Simplicity is is what makes wordpress so great. Again good plugin!
January 10th, 2005 at 10:36 am
Nice plugin. But doesn’t work. Instead publishing I’m get error message: Database error: [You have an error in your SQL syntax near 'WHERE Post_ID = 19 AND meta_key = 'showfrontpage'' at line 1]
SELECT meta_value FROM WHERE Post_ID = 19 AND meta_key = ’showfrontpage’;
Any ideas?
January 10th, 2005 at 1:22 pm
ok, i installed it and nothing happens, I untick ‘Show on front page’ and save and publish the article. I go to my front page and there it is. I go back to the article and edit it and the box is ticked so I untick it again and save and publish and once again its there,
The tick box just stays ticked
January 10th, 2005 at 1:30 pm
Mat,
What version are you running? (Wordpress version)
I’m beginnging to think that I’m using some 1.3+ features.
January 10th, 2005 at 1:33 pm
I have 1.2.2
January 10th, 2005 at 1:38 pm
Do you have a 1.3 install to try it on? I may have to backrev a feature or something to get it to work on 1.2.2.
January 10th, 2005 at 1:42 pm
Not got 1.3, will install and give it ago!
January 10th, 2005 at 5:05 pm
Have installed 1.3 and it works - seems this plugin is for 1.3 and upwards
January 12th, 2005 at 6:23 am
Hi Richard. You advice is right, just upgraded from 1.2 to 1.5 and everything ok now. Thanks a lot. Nice job.
January 12th, 2005 at 8:50 am
This is a great idea!
… wish it was available for 1.2.2 though, not ready to upgrade just yet ..
January 14th, 2005 at 1:09 pm
please make it available for the latest version!
January 14th, 2005 at 1:21 pm
Xain, do you mean make it available for 1.2.2? It already works with the “latest” versions which are 1.5 nightly builds.
January 15th, 2005 at 9:00 am
- http://www.phpbb.com - Forum kan man göraQ - http://www.q4music.com - MusiktidningR - http://www.richardgoodwin.com/wp/?p=24 - Smart WP-plugin till som tyvärr inte funkade hos mig …S - http://www.sta [...]
January 16th, 2005 at 10:36 am
oh sorry, i meant 1.2.2
thanx…
January 19th, 2005 at 7:37 am
can u plz fine a solution for that?
January 19th, 2005 at 9:40 am
Xain,
I’m sorry, with school and work keeping me busy I’m not sure I have time to do this at the moment. But I fully support if someone else wants to hack my version to work on 1.2.2, and will host the plugin, etc.!
January 28th, 2005 at 11:56 am
??????????????????????????????? ShowOnFrontPage - ????? ???????? ????????“Show on front page?? [...]
February 23rd, 2005 at 3:29 pm
Hey there,
Given any thought to extending this plugin to include ordering?
Maybe include an admin control panel where you could move items up or down as well as remove an item from the frontpage. You could probably just add a new custom field and then a new admin panel that checks.
Anyway, just some ideas.
I have been working on my own plugin along these lines but I’m not far along enough in uderstanding wordpress to completely get it to work.
February 26th, 2005 at 2:26 pm
This is a much needed plugin, ta for making it.
One feature I’m trying hack in is to change the default from ‘Checked’ to Unchecked. That is, I want the default to be not to appear on the frontpage. I think I’ll figure it out, but it would be nice if the default could be set by changing one variable in the code.
February 27th, 2005 at 3:04 pm
GREAT plugin for 1.5. Just what I needed. Thanks!
March 3rd, 2005 at 11:59 am
Nice plugin!
I am using it in my blog http://c3w.de and ists working very good. Thanks a lot! 
March 9th, 2005 at 6:00 pm
I’ve just tried this and it seems to work, but displays the following on my site:
WordPress database error: [Table 'strayhorn.cat_visibility' doesn't exist]SELECT cat_ID from cat_visibility
WordPress database error: [Table 'strayhorn.cat_visibility' doesn't exist]
SELECT cat_ID from cat_visibility
Any suggestions?
March 9th, 2005 at 7:44 pm
My mistake, problem was related to a different plugin I forgot to deactivate.
March 9th, 2005 at 8:52 pm
[...] in: ShowOnFrontPage Filed under: Irreverent Errata — Blog Goddess @ 5:52 pm richardgoodwin.com » Blog Archive » New Plugin: ShowOnFrontPage [...]
March 10th, 2005 at 2:28 am
[...] ??????????????????????????????? ShowOnFrontPage - ????? ???????? ????????“Show on front page?? [...]
March 22nd, 2005 at 4:53 am
Thank you so much. I have been looking for a plugin like this for a long time.
April 1st, 2005 at 3:02 pm
This plugin is a Godsend! Exactly what I was needing for a client’s hybrid blog I’m working on! You rule!
One request, though. How about a way to make posts in whole categories invisible on the front page, but have the posts still visible when you view the category? A “make all posts from X category invisible on front page only” thing.
April 7th, 2005 at 11:55 pm
VERY Nice, much better than trying to make a category limitation for the front page. I do have one complaint though. Now I get “— Next Page »
” on the home page, and there is nothing on the following page.
I never ay this before, not even when I had at leat three times as many posts on the homepage. They just scrolled.
Is there a way to supress this “Next Page” link
April 8th, 2005 at 2:21 pm
I got it! I had my “maximum number of posts to display” set to 12, as seen on the Options section of the Dashboard/Admin screen. Even though the categories I wanted to be displayed on the front page were filtered down to just two posts, the plugin script script still saw that there were 13 possible, and thus dislayed the “next” link. Once I increased the limitation to 100, all is fine.
ps: BIG APOLOGIES to Richard. I had emailed him earlier, but accidentally about a totally different plugin…created by someone else. Sorry.
April 18th, 2005 at 8:35 pm
[...] howOnFrontPage Plugin
April 19th, 2005
Found this nifty plugin at richardgoodwin. The plugin lets you decide whether the post will appear in the front page or not. This can [...]
April 25th, 2005 at 10:01 pm
can’t seem to get this one to work… I simply don’t get a checkbox.
May 4th, 2005 at 9:17 am
Same issue as Stephane above - no errors, but checkbox does not appear. (using WP 1.5)
May 4th, 2005 at 4:29 pm
no checkbox for me either (WP1.5 with KarmaPress upgrade)
May 5th, 2005 at 3:48 pm
I found the cause of my missing checkbox - my host is running PHP as a CGI, which breaks a bit of the plugin. In line 115 of showfrontpage.php:
if(preg_match(’|post.php|i’, $_SERVER['SCRIPT_NAME']) && $_REQUEST['action'] == ‘edit’)
Changing SCRIPT_NAME to SCRIPT_URL seems to fix things up for me.
(With PHP-CGI enabled, $_SERVER['SCRIPT_NAME'] always returns something like ‘php.cgi’, causing the regex to fail. The correct script name is returned by using $_SERVER['SCRIPT_NAME'].)
Hope this helps some people out, and thanks for the great plugin!
May 7th, 2005 at 3:13 pm
[...] ; require(’./wp-blog-header.php’); ?> If you’d like a plugin to do this task then Richard Goodwin has developed one to do a similar job. Happy WordPress-ing. [...]
May 8th, 2005 at 6:42 am
Thanks Jobu
Currently doing a few draft posts whilst I’m at work - I’ve noticed that the checkbox appears after I have saved the post.
Will investigate further when I get home…
May 8th, 2005 at 10:41 pm
nikki - A quick and dirty fix for that would be deleting this from the line mentioned above:
&& $_REQUEST[’action’] == ‘edit’
There’s a better way to do it, but this shouldn’t cause too much funny business if you want to try it out.
May 16th, 2005 at 6:32 pm
One question, this checkbox only seems to appear if you have “Standard” selected under options for when you begin to write your news articles and shows up once you click on the “Advanced” tab, but if you dont save the post or do anything seriously delicious then it turns it into a draft automatically?
How can I stop it turning into a draft automatically?
I like to have the advanced mode ticked for when I create an article so I get all the features I need without having to click more buttons to write an article… The checkbox does not seem to appear this way, it only seems to appear when editing a draft article or an article already posted.
Any solutions mate?
May 23rd, 2005 at 12:11 pm
Using a basic fresh install of WP 1.5.1.1, I’ve found the plugin creates duplicate entries for the showfrontpage key and prevents deletion of the duplicates until the plugin is disabled. This installation was part of Dreamhost.com’s included site hosting bundle, fwiw.
May 28th, 2005 at 4:52 pm
Thats a great idea! I’ll probably try it out
May 28th, 2005 at 7:57 pm
[...] or trackback from your own site.
[...]
May 28th, 2005 at 8:00 pm
[...]
WordpressMay 28, 2005 07:56 pm
Plugins
ShowOnFrontPage It will add a checkbox to the Post Status field called “Show on front page” which will [...]
May 31st, 2005 at 12:12 pm
This is perfect - just what I was after! I wanted to keep my movie reviews off my front page and now I can! If someone is subscribed to my RSS feed, will the new posts show up for them even though they are not on the front page?
June 2nd, 2005 at 3:55 pm
i like your solution, but it seems to that it dosent work on 1.5
I have an other languageversion installed, could this be the problem, that i got now checkoxes?
greetings from germany,
josch
June 17th, 2005 at 6:07 pm
I run 1.5 and am having the problems matt is describing above (uncheck it, article still posted in front, go to edit and its checked again)
any ideas?
June 27th, 2005 at 1:28 am
Hi!
I have installed your plugin, but everytime, I edit an page, it adds a showfrontpage to the keys. The result is, that I have many entries for the same key and the same article…
Should be checked for Version 1.5.1.2 of WP. Please drop me a mail, if you have some hints for me!
June 28th, 2005 at 8:25 pm
something isnt right with the php file. there seems to be missing a closing php tag. every post i make gives me a message about cannot modify header files. i disable the plugin and i can post fine.
June 29th, 2005 at 7:18 am
I have used and loved your plugin on WP 1.5.1.2
Today I have updated to WP 1.5.1.3 and it’s gone! No more “show on front page” ….
Will there be an adaption to Version 1.5.1.3 ???
That would be so great!
Thank you for your work and this great plugin
June 29th, 2005 at 11:29 am
It’s possible my problem was becuase i was using the SVN and not the 1.5.2. I moved to 1.5.2 and my problem has gone away. thanks
July 3rd, 2005 at 3:31 am
I think you’re right Richard. The plugin doesn’t work in WP 1.5+. I installed the same and doesn’t show any options in the ‘Post Status’ area. Having said that, I think you or someone from the WP community, should take some time out and update the script ASAP. It’s a definite boon to people like me who are non-developers and would like to have this feature soon.
July 3rd, 2005 at 3:50 am
OK..sorry for my earlier comments. After going through the comments trail I realised that saving the post, displays the “Show on Frontpage” option. It’s still not functioning to my liking though.
July 4th, 2005 at 12:44 pm
If you click on Advanced Editing you should see the options straight away without having to save then edit.
August 6th, 2005 at 5:43 am
This plugin has been really helpful for me as i want to keep things off the main page. But i also (someone else has mentioned this) would like to set the default settings as unchecked.
I have tried to alter the code in the plugin (Changing true to flase, for checkbox value) but has made no difference!
Any ideas, as otherwise i cannot post via email as it will jump on to the front page.
September 13th, 2005 at 2:17 am
I made a few minor changes to 1.3 in order to fix a couple issues.
1) Placed the show on frontpage checkbox on new posts as well as when editing posts.
2) Fixed a problem where every time I pressed save when the check box was not checked it would create a new meta record for the showfrontpage value.
(edited: New version available for download at top of post)
October 10th, 2005 at 12:48 pm
Your functionality works for Page type posts too. With viewlevel 1 set for a Page, the user cannot view the page.
However, the page is still listed in the sidebar. It’s be great if the page wasn’t even listed in the sidebar unless they were logged in and of a certain level.
Nice plugin.
October 10th, 2005 at 1:09 pm
Sorry. Comment above was for the wrong plugin.
I had a few too many tabs open.
However, for your plugin, I am having an issue. By default the box is NOT checked, but the value = true. No matter how many times I check/uncheck the box on the initial Write, it appears on the front page. I have to go into the post after I save it to update the flag.
October 12th, 2005 at 8:48 pm
I am using wordpress 1.5 at http://www.rapnews.co.uk
Problems:
1. When writing a new post, and unticking the ‘display on frontpage’, this is ignored and the post appears on the main page. I have to go into edit mode on that particular post, and uncheck the option.
2. My frontpage is set to display the most recent 20 posts. Once I installed the plug in, I started going through the posts listed in ‘manage’ and turning off ‘display on frontpage’ to lots of them’. I’ve done this on several ‘manage’ pages, including page 1 which is this month, and page 2 which is last month. On my main page, only 9 posts appear. There are 9 posts in the current month. Can I not make it display the posts from last month which I want displayed?
3) The lack of there being a working method to set the default choice for the checkbox would be appreciated.
November 30th, 2005 at 2:36 am
[...] Sometimes you have a blurb to add to your blog, but you just don’t need to be constantly posting to the front page. This plugin is set up so you can check it off if you don’t want the post to be shown on the index page of your blog. It would be handy I suppose if you had some articles that were written previously and just want them posted to that day…. instead of reposting them to the main page. [...]
December 29th, 2005 at 5:21 pm
[...] Ok, I admit that last four or five posts were a bit IT-overfraughted. Fortunately, I found a plugin for Wordpress (the weblogging tool used for this site) which allows to decide whether to show new posts on the front page which is the default, obviously, or to let them go straight-to-archive. Now, you won’t see any MythTV related posts ever again, unless you go to the archive, or I also file them in a different category. [...]
January 2nd, 2006 at 3:54 pm
[...] Plugins — for those of you who don’t know — are additional modules that add extra functionality to the WordPress application. For example, by default the search function in WordPress only searches the data in Posts and not static Pages, so the excellent Search Pages plugin extends the search to include Pages too. Another example, the ShowOnFrontPage plugin controls whether Posts show on the front page or not — very useful if you’re using WordPress as a Content Management System. [...]
January 5th, 2006 at 5:50 pm
I have found a couple bugs that I fixed in the plugin. By reading the comments above it seems that some of the users having troubles with 1.5+ should benefit from these changes. They are really simple to add.
1. the plugin does not save the show on front page setting correctly when publishing a post the first time. you have to go back and edit that post and then it will save the setting. to fix this bug add this:
on line 44 after the line
add_filter(’the_posts’,’showfrontpage_clearposts’,10);
add this
add_action(’publish_post’, ’showonfrontpage_editpost’);
this can really go anywhere in the file outside of another function. i just put it hear for fun.
2. the default setting for the checkbox when writing a new post was set to ‘Unchecked’, but if you want the to default to be ‘Checked’ then add this to approx. line 121 or 122
else
{
$checked = ‘ checked=”checked”‘;
}
hope that helps you all out.
January 17th, 2006 at 1:53 pm
Thanks for the plugin, and the edit above.
Works fine for me in 2.0: I added it to the 2.0 plugin compatibility list
http://codex.wordpress.org/User:Matt/2.0_Plugin_Compatibility#P_-_S
January 27th, 2006 at 2:47 pm
I edited a little more, because the “Show on Front Page” checkbox is showing up at the bottom of every a lot of pages in the admin. I changed
if ( preg_match(’|post.php|i’, $_SERVER['SCRIPT_NAME'] ) && $_REQUEST['action'] == ‘edit’ || $_REQUEST['action'] == ” )
to
if ( preg_match(’|post.php|i’, $_SERVER['SCRIPT_NAME'] ) && ( $_REQUEST['action'] == ‘edit’ || $_REQUEST['action'] == ” ))
I basically added the extra parens around the “or” statements.
February 2nd, 2006 at 11:19 am
oh yeh !
huh’ , i searched something like that for 1 hour and finally here it is
Working good with 2.0.1
Thanks Richard
February 2nd, 2006 at 10:05 pm
Finally i found what i’ve been looking for!! Your site!
Great site, folks!!
great graphics…;)
March 8th, 2006 at 9:38 pm
This is a great plugin. Really usefull. Thanks a lot
April 18th, 2006 at 10:15 am
Works perfect, also on 2.0.2. Should be default wordpress fuctionality!
May 18th, 2006 at 8:53 am
I was a bit to enthousiastic, I guess. I had to use Ken’s hack to make sure it didn’t show up on every page. That’s ok, doesn’t cost much effort. Now I have another. more serious problem:
All of a sudden, after I posted a lot (6) of posts that were not on the frontpage, only the last post showed up on the frontpage, all others dissapeared into the categories. They still had the ’show on frontpage’ button checked though. After deactivating the show on frontpage plugin everything went back to normal. I’m not sure what is the problem all of a sudden. it could be the many non-frontpage posts, but it could also be something else.
Anyone with the same problem? (I’m really sad now, because I liked this plugin alot. Now I have to mess around with dates to get posts of the mainpage
)
August 23rd, 2006 at 5:15 pm
Fantastic plugin - I’m new to the whole Wordpress thing and this is great!!! Exactly what I was looking for - you da MAN !!!
August 25th, 2006 at 10:04 pm
A truly awesome plugin, a must. Great work !
August 26th, 2006 at 11:40 pm
[...] New Plugin: ShowOnFrontPage at richardgoodwin.com (tags: wp:plugin) [...]
September 8th, 2006 at 10:22 am
Great work!
Thanks.
September 10th, 2006 at 4:25 pm
Your horoskope for today is fantastic…use it the best way
September 25th, 2006 at 7:48 pm
Concur with all commenters above: great! Should be WordPress standard.
October 16th, 2006 at 10:58 am
拓展è®ç»ƒ ,[url=http://www.nicefu.com]拓展è®ç»ƒ[/url],拓展è®ç»ƒ ,[url=http://www.51nlp.net]拓展è®ç»ƒ[/url]
October 23rd, 2006 at 9:52 am
i would like to use pocket SharpMT to blog in wordpress. sharpmt uses movable type as i know. it allready works with the wordpress standard xmlrpc.php which writes the movable type posting into the worpress database.
) every time i’m blogging via bloggingsoftware and not using the wordpress form.
but now comes ShowOnFrontPage in: as i’m using the showonfrontpage-plugin, all my posts via xmlrpc won’t show up on my frontpage as somehow the showfront variable is set ‘false’. now im looking for a way to avoid having set that variable (without deactivating showonfrontpage-plugin
any ideas?
October 23rd, 2006 at 9:58 am
[...] i would like to use pocket SharpMT to blog in wordpress. sharpmt uses movable type as i know. it allready works with the wordpress standard xmlrpc.php which writes the movable type posting into the worpress database. but now comes in the handy wordpress-Plugin ShowOnFrontPage. i like this plugin a lot, but: everything posted via xmlrpc.php (and not via wordpress authoring form) won’t show up on my frontpage. somehow the showfront variable of that post is set ‘false’. now im looking for a way to avoid having set that variable (without deactivating the showonfrontpage-plugin
) every time i’m blogging via bloggingsoftware and not using the wordpress form. any ideas? Moblogging Plugins Technik Wordpress Weitere thematisch naheliegende Einträge Download EzStaticHexa-FarbenZwei neue Bücher… [...]
November 4th, 2006 at 3:45 pm
Buon luogo, congratulazioni, il mio amico!
December 1st, 2006 at 9:02 am
I’ve installed the plugin and I can check and uncheck the checkbox and save it correctly, but eitherway the post will show on the page.
(using Wordpress 2.0.5)
April 7th, 2007 at 6:06 am
There was a bug (atleast for me) that made the post dissapear from frontpage when someone entered a comment on the post. It seemed like when entering a comment it called the filters and accidently set the ShowOnFrontpage to ‘false’.
I fixed this by changing line 90.
else {
to
else if (isset($_REQUEST["post_ID"])) {
.. this makes sure the showonfrontpage value only is updated when editing a post.
Regards
January 17th, 2008 at 10:24 am
[...] a brief update as suggested by a commenter to my ShowOnFrontPage plugin. Thanks Viktor! Sphere: Related [...]
January 25th, 2008 at 5:55 pm
Hi, Richard,
Not sure if I am doing something wrong (entirely possible since I am still a WP newbie) but I can’t get the plugin to show up in the plugin list using WP 2.3.2. I’ve tried uploading it in the folder and without the folder - either way it doesn’t show up in the list…
Thanks!
Rachel
April 5th, 2008 at 4:07 am
Hi Richard
Nice plugin. Tried it on a 2.3.3 blog and whilst i can activate the plugin unlike Rachel above it does’nt actually work.
Any ideas?