Random Featured Post Plugin
Download from WordPress.org
The Featured Post plugin allows you to display a random post from a designated category. Ideally this should draw readers landing on your homepage to some of your best posts. The featured post will display the title ‘Featured Post’ (customizable) along with the post’s title, an excerpt and a link to continue to the full post.
This plugin requires Wordpress version 2.3 or higher and has been tested up to version 2.5.1.
Installation
- Download and unzip featuredpost.zip (see below) to your plugin folder.
- Activate the plugin from the Plugins section of your dashboard.
- (Optional) Create a ‘Featured’ category.
- Go to the ‘Featured Post’ options in your dashboard and select the categories from which you would like posts to be randomly selected.
- Check the ‘Show Featured Post’ box and click ‘Update’ to save your changes.
- Place a call to the show_featured_post() function in your template, most likely in your main index template just before the loop. See additional notes below.
Additional Notes
- The show_featured_post($PreFeature = ”, $PostFeature = ”, $AlwaysShow = false, $categoryID = 0) function has five optional arguments. The first two are for any HTML you would like to display before and after the featured post. The third argument is a boolean (true/false) argument which will override the ‘Show Featured Post’ option and always display the featured post when true. The fourth option allows you to specify a category to display from, overriding the selection in settings page.
- If you choose to display excerpts, the plugin will display your optional custom excerpt from the advanced options section of your post; otherwise, the standard Wordpress excerpt is shown. The fifth option allows you to show more than one post at a time, overriding the settings page option.
- This plugin respects the <!–more–> tag when you choose to display the full content. There is a setting which allows you to ignore the tag and display the full post.
Examples
-
This example will display the featured post only on your homepage inside a span block:
if ( function_exists('show_featured_post') ) if (is_home() && !is_paged()) show_featured_post('<span class="container">','</div>'); - This example will always display the featured post, ignoring the ‘Show Featured Post’ option and the category ID option in settings:
if ( function_exists('show_featured_post') ) show_featured_post('', '', true, 42); - All output is contained in a DIV class named “featuredpost” and can be adjusted via your stylesheet.
Change Log
v1.1.3 (May 15, 2008)
- Bug fix: more tag was not being respected on single posts/pages when full content option was selected.
v1.1.2 (May 5, 2008)
- Added option of showing posts and/or static pages.
v1.1.1 (April 30, 2008)
- Added multiple category selection option.
- Added option to display multiple posts.
v1.1.0 (April 28, 2008)
- Discontinued use of truncated post content and switched to the option of displaying full post content with HTML intact or standard excerpts, custom or Wordpress generated.
- Added option to ignore the <!–more–> tag when displaying full post content.
- Added fourth argument to show_featured_post() function to allow category ID from settings to be overridden.
v1.0.1 (April 11, 2008)
- Added category name and ID table to options page for convenience.
v1.0.0 (April 7, 2008)
- Initial plugin release.
Bugs/Feature Requests
You can leave a comment below or contact me at scott(at)mydollarplan(dot)com.
If you find this plugin beneficial, please consider donating for the author’s time. Any little bit is appreciated!
Download from WordPress.org






Great plugin and just what I’m looking for. Many thanks.
Unfortunately, as a relative newcomer to Wordpress and adjusting css style sheets, the additional notes and examples provided are a bit beyond me. Not quite sure where to place the code. Any chance of a more detailed step-by-step on how to do this?
Kate FoyApril 9th, 2008 at 3:20 am
Kate,
ScottI’m not very good with CSS either but here’s my best attempt at an explanation. In your Design-Theme Editor, open your stylesheet and create a section like this:
#content .featuredpost {
border:1px solid #000000;
}
You can further adjust other elements in the featured block, such as the post title, like this:
#content .featuredpost h2 {
color: #FF0000;
}
Does that help?
April 9th, 2008 at 9:42 am
I’ll give it a shot. Thanks Scott.
Kate FoyApril 9th, 2008 at 8:29 pm
Hi Scott
no go. This is what I have done:
downloaded, unzipped and uploaded the plug-in to my plug-ins folder; activated the plug-in on my WP Dashboard; inserted the category name for random post to choose from; saved. BTW, I assume Category ID is the name of the category? It’s not showing after I hit the save button.
I then inserted this code in the index.php within my theme folder:
<?php if ( function_exists(’show_featured_post’) )
if (is_home() && !is_paged())
show_featured_post(”,”);?>
And in my CSS style sheet for the theme, I’ve inserted:
#content .featuredpost {
border:1px solid #000000;
in the content styles section of the file.
I can only think I’ve got the code in the wrong place, either within the particular file or in a wrong file altogether.
Sorry to be a pain, but I’d really appreciate a solution as I’ve gone past the ‘forget it’ stage and want to make it work! Call me ornery …
Best
Kate FoyApril 9th, 2008 at 9:58 pm
Kate,
ScottThe category ID is a number, it won’t save if you enter text. In your dashboard go to Manage-Categories and click the category you want. Then look in the address box of your browser and you’ll see a cat_ID= at the end of the URL. The number at the end is what you want. Also, did you check the “Show Featured Post” box in the options? If you need more help just shoot me an email.
April 9th, 2008 at 10:30 pm
Is there a way in which you can put more control in this plugin? Such as the fact, that some users may not want a random post, but posts ordered in terms of the newest first..
NickApril 10th, 2008 at 12:11 am
Nick,
ScottDo you mean that you want to always display the single newest post from a specific category as your featured post? Or am I reading your comment wrong?
April 10th, 2008 at 9:05 am
Very interesting plugin. I’ll probably use this for some of my future theme developments.
@Nick: You can probably just use a wp_Query to do that.
Good luck!
LelandApril 10th, 2008 at 10:23 am
Ok Im a retard…. Could anyone do a step by step guide for this?? I mean down to the \”T\”… Sorry and thanks for all the help…
TimApril 10th, 2008 at 11:27 pm
This is the perfect plugin for me except I need to allow it to show images — any advice? I am trying to show a thumbnail that links to my latest project but right now I can only display text.
KristenApril 16th, 2008 at 11:07 am
@Kristen
The plugin shows the content of a post. I can put in an option to not strip HTML tags from the post content which would show images in your post, along with any text you might have as well though.
ScottApril 16th, 2008 at 11:25 am
That would be perfect. I tried examining the plugin code but couldn’t identify what exactly I needed to modify.
KristenApril 16th, 2008 at 11:49 am
@Kristen
Look for the lines
$desc = attribute_escape(strip_tags($post->post_excerpt));
and
$desc = attribute_escape(strip_tags($post->post_content));
and replace them with
$desc = attribute_escape($post->post_excerpt);
and
$desc = attribute_escape($post->post_content);
respectively.
ScottApril 16th, 2008 at 11:55 am
I modified the plugin as instructed and it nearly works — except instead of displaying the image you see <img src=”…..”
KristenApril 16th, 2008 at 12:22 pm
Sorry, forgot to take off the attribute_escape functions as well. The lines should be
$desc = $post->post_excerpt;
and
$desc = $post->post_content;
ScottApril 16th, 2008 at 12:34 pm
Thanks a million, it definitely works now!
KristenApril 16th, 2008 at 1:01 pm
Great plug-in, thanks. I’m using the following classes in my stylesheet, which work well for me:
h3.featuredpost
h2.featuredpost a
AndrewApril 16th, 2008 at 10:55 pm
this actually works a bit better though after tinkering:
div.featuredpost h2 a
div.featuredpost h3
AndrewApril 17th, 2008 at 1:16 pm
Hi, thanks a lot for this great plugin. I like it very much and you can see it in action on my site.
Some questions:
I would like to use the more-tag including images instead of truncating the text. Is that possible or do you plan this feature?
The solution in comment 15 breaks the formattings when attributes like strong or italic are used? Is it possible only to use the img-tag inside the truncated text?
Best wishes and excuse my chaotic english.
Daniel
DanielApril 22nd, 2008 at 9:26 am
another question is, if it possible to use this as a widget?
DanielApril 22nd, 2008 at 9:30 am
@Daniel,
Widgetizing this plugin is not possible; however, there are other plugins out there for displaying featured posts in your sidebar if that’s what you would like to do. Check the Wordpress.org plugin database. I’ll take a look at your other feature requests when I have a chance.
Also, if anyone is just looking for a plugin to display a single featured post and is not interested in randomizing from a group of posts then I would recommend using the WP-Sticky plugin.
ScottApril 22nd, 2008 at 9:39 am
Hi Scott,
yes I wanted to show your random featured post in a sidebar, because I like the flexibility to manage a group of articles through the categories, which are important for me
It would be really great to use an eyecatcher too.
DanielApril 22nd, 2008 at 10:11 am
I’m not a coder, but this worked for me:
$desc = strip_tags(($post->post_excerpt), ”);
DanielApril 22nd, 2008 at 10:54 am
Hi Scott,
Thanks for sharing with us this plugin. It works well in our site ~ with truncated text, etc.
Because I wanted to display the entire text of the post being rotated, I increased the character limit in the admin option which works okay except all the html tags and formats are lost.
Is there a way I could display the entire text of the post being rotated with formatting being retained?
Thanks heaps.
PamPam
April 26th, 2008 at 6:50 pm
Hi- I’ve added this plugin to my site and it works great, but how do I set it to show more than one featured post at I time? For now I’ve duplicated the code: , but more than often it shows the same featured posts in a row.
CaseyApril 26th, 2008 at 8:57 pm
@Pam:
I’ll really try to fit in some time to work on the plugin this week. In the meantime, comment 15 will do what you’re looking for, but keep in mind that if the post is ever truncated in the middle of a tag it will mess up your formatting.
@Casey:
ScottThis plugin is really designed to only show one featured post at a time but I’ll see about adding an optional parameter to the function call so that you can specify different categories for each call, that should help you out.
April 27th, 2008 at 9:07 pm
Ok Scott thanks! I only need to specify one category - but I’d just like to show more than one Featured Post at a time. Let me know if you find a way to make that work - thank so much!
CaseyApril 28th, 2008 at 6:34 am
The plugin has been updated with a few new options. Basically, the truncated post option has been discontinued in favor of displaying either full, formatted post content (with or without more tag) or post excerpts.
@Casey:
ScottThe best I could do for you is add an additional option to the function call to specify the category (see above for example). You’ll be able to have two featured posts at once but they will have to be from different categories. You can have them come from the same category by creating two new categories just for featured posts and then adding different posts to each of those categories, along with their original categories.
April 28th, 2008 at 2:07 pm
Thanks very much, Scott. You’re a legend!
The admin option to use “excerpt” or “full text” with formatting remaining intact is just exactly what I’ve been looking for.
PamApril 28th, 2008 at 3:22 pm
Its possible to configure more than just one category?
MiguelApril 30th, 2008 at 2:02 am
@Miguel:
That’s one of the things on my “to do” list for this plugin.
ScottApril 30th, 2008 at 8:39 am
Plugin has been updated with multiple category selection and multiple post options.
ScottApril 30th, 2008 at 1:31 pm
Wow, thats was fast… thanks for the wonderful plugin, I am using and will update.
MiguelApril 30th, 2008 at 8:17 pm
Hi - really useful plugin with one problem which means I can’t use it. I’ve just noticed that it displayed one of my ‘pages’ instead of one of my ‘posts’, even though pages don’t fall into any of the categories - is it possible to exclude ‘pages’?
PaulMay 4th, 2008 at 9:13 am
@Paul:
Good catch. The plugin has been updated with the option of displaying posts and/or static pages.
ScottMay 5th, 2008 at 10:53 am
Sounds good, and I would like to try this plugin but after bouncing back and forth between this page and the Wordpress plugin page I cannot find it.
Where is it?
DigitalZipMay 5th, 2008 at 1:14 pm
@DigitalZip:
The link is at the top (I just added) and bottom of this page. It takes you to the WordPress.org Plugin Directory where you can find the download link on the right side of the page in an orange box.
ScottMay 5th, 2008 at 1:20 pm
Thank you Scott. It’s not very obvious on Wordpress that you should click on the orange download box. Well it isn’t to me
Got it now anyway.
DigitalZipMay 5th, 2008 at 1:27 pm
Hi Scott
I was the first commenter here and just wanted to say thanks for your neat plug-in and for being such a responsive developer. It’s really appreciated especially by those of us who are ‘challenged’ by all this coding stuff!
I’m part of the comment08 challenge running right now to increase communication round the blogosphere, and thought I should say thanks to people who make my blogging life much easier. You’re on my list!
Best wishes.
Kate FoyMay 5th, 2008 at 4:29 pm
Wow, that was quick! Since my comment I have been dabbling with using multiple loops within Wordpress, and found that this is also a good way to display a single random post alongside my usual homepage content. I’ll use that route in the interests of keeping plugins to a minimum, but this is certainly useful for those who don’t want to delve into advanced stuff like multiple loops.
PaulMay 5th, 2008 at 5:20 pm
Thanks Scott. Given the series of improvements that you have introduced to your plugin, I guess comment #24 has helped it realize its full potential, that there’s a big community out there looking for this kind of plugin. Good work! ~ Pam
PamMay 6th, 2008 at 5:22 pm
Glad to see others are finding this useful.
Spread the word!
ScottMay 6th, 2008 at 9:09 pm
hi. Thanks for plugin
perfect.
regards
baronMay 11th, 2008 at 11:55 am
Hi Scott,
I wanted to add this code into single.php to showw my featured articles in top of each post.
On my Homepage it works fine but in single.php it always displays the full post?
Best wishes
Daniel
DanielMay 12th, 2008 at 1:01 pm
@Daniel:
Are you using the most recent version of the plugin? I’m unable to replicate the problem you’re having. Please check your settings and make sure you’ve selected “display excerpt” under the content options.
ScottMay 13th, 2008 at 9:18 am
Hi, Scott.
Thanks for a great plugin. I’ve got it working pretty well.
I’d like to see the date of the featured post show up with the post and excerpt. Could you help me with the code for that?
Thanks!
WardehMay 13th, 2008 at 9:35 am
@Wardeh:
I thought about including the date but decided against it because typically a “featured” post would be an older post from deep in your archives and highlighting the date might keep readers from clicking through, or at least that was my thinking.
If you want to add the date you’ll need to modify the code. Look towards the end of the show_featured_post function and in the place of your choosing insert the line
Scottecho date(”F n,Y”,strtotime($thepost->post_date));
May 13th, 2008 at 1:09 pm
Hi Scott,
I use 2.3.3 and K2. The problem is, that the same functions has different results. On my homepage everything works fine, but in single.php I got the whole article.
No, I use full content with “more-tag”. If I switch to “excerpt” everything works fine.
DanielMay 15th, 2008 at 1:29 am
@Daniel:
I hadn’t tried the full content option with the more tag on a single post. I found the bug and the plugin has been updated. Thanks for bringing it to my attention.
ScottMay 15th, 2008 at 11:15 am
hi scott, thanks a lot. hope your private million dollar plan works
but there is another mysterious behaviour. on the homepage it works again fine, but now after the more tag, only on single page, I get the list of related articles inside it?
DanielMay 15th, 2008 at 12:32 pm
@Daniel:
I’m guessing this is because whatever plugin you are using to generate the related articles is hooking the function that displays the formatted content. I’m not sure how to get around this. What plugin do you use for related articles?
ScottMay 15th, 2008 at 1:14 pm
hi scott, I use simple tags: http://wordpress.org/extend/plugins/simple-tags
DanielMay 15th, 2008 at 2:10 pm
@Daniel:
I just glanced at the code for that plugin and I’m near certain that’s the issue. You can probably test it by disabling that plugin. I’m not sure how to get around that, but I’ll do some thinking and let you know if I figure it out.
ScottMay 15th, 2008 at 2:16 pm
You’re right. When I disable the plugin everything works fine, as it should.
It’s a pitty, because I like simple-tags for managing the tags very much. Hope you find a solution.
DanielMay 16th, 2008 at 4:54 am
but for the moment I decided to disable the related posts, because your way of featuring articles is much more attractive.
DanielMay 16th, 2008 at 9:28 am
@Daniel:
I’m glad you find the plugin so useful. Until I can find a fix, you might want to check out another plugin to do the related posts. We use Similar Posts here and I’m happy with the way it works.
ScottMay 16th, 2008 at 9:31 am
I’ve successfully done steps 1-5 but 6 is where I get confused… what does it mean to place a call? and what is a loop… What exact code should I be placing in my index.php per theme??
LinzMay 16th, 2008 at 12:09 pm
@Linz:
In index.php look for the line that has “while (have_posts())” in it; that’s the start of the loop. Just before that line place the code from the first example above, making sure to include it between the “” tags.
ScottMay 16th, 2008 at 1:15 pm
Great plugin. Anyway, can it be inserted into the page/page?
Thx
gofreeMay 16th, 2008 at 1:35 pm
@gofree:
Yes, but if you read the other comments you’ll see that it may conflict with some plugins.
ScottMay 16th, 2008 at 1:46 pm
Hi Scott,
I am trying to call it using this show_featured_post() with Adman plugin to have the featured post appear on the top of index in homepage, but it seems not working as it shows the code show_featured_post() back.
Did I do sth. wrong.
Thanks
gofreeMay 16th, 2008 at 11:14 pm
@Scott. Great tipp. Thanks again.
DanielMay 17th, 2008 at 2:27 am
Working perfect on my site, I enjoyed the new implementations and support. Good Word
MiguelMay 18th, 2008 at 10:05 pm
Hi Scott,
Great plugin. It displays my posts excerpts with no problem. However, when I go to display my pages it shows nothing.
Have I done something wrong?
SheriMay 19th, 2008 at 7:28 am
@Sheri:
I checked out your site and I see you’re using it on all of your pages… maybe I don’t understand the problem you’re having? Also, the formatting for the featured post is aligned too far to the left on Firefox 3 and IE 7.
ScottMay 19th, 2008 at 9:00 am
Scott,
Thanks for looking. They show up as long as I have posts and pages checked, but if I just check pages - which is what I would like to do - the entire box disappears.
I am running a browser check via browser shots right now. If it is aligned too far left I am unsure what to do - as moving it will mes it up in other browsers. Any advice would be very helpful.
Thanks again
SheriSheri
May 19th, 2008 at 10:27 am
@Sheri:
Maybe we have our terminology mixed up. The “static pages” referred to in the settings are things like an about page or archive page which are managed in a different section of WordPress. Can you be more specific as to the problem you’re having?
As far as the alignment, CSS is not my thing so I can’t help you there.
ScottMay 19th, 2008 at 10:46 am
lol, CSS is sometimes a savior and other times a pain.
Wordpress has posts and pages. In my pages section I am using eshop for my shopping cart. What I would ideally like to do with this plugin is use it to display random items from my pages - not my posts. Does this help at all?
Sheri
SheriMay 19th, 2008 at 10:54 am
@Sheri:
Ok, I understand your problem. Unfortunately, WordPress doesn’t allow you to categorize pages. I’m not sure how one of the previous commentors had static pages show up, I assume another plugin was being used. I did find this plugin which claims to tag static pages but I’ve not tested it. Feel free to give it a try and let me know if it works.
ScottMay 19th, 2008 at 11:16 am
Again please,
Hi Scott,
I am trying to call it using this show_featured_post() with Adman plugin to have the featured post appear on the top of index in homepage, but it seems not working as it shows the code show_featured_post() back.
Did I do sth. wrong.
Thanks
gofreeMay 19th, 2008 at 12:17 pm
@gofree:
Then you’re not putting the code between the php tags. I would recommend you find a tutorial on modifying WordPress themes; explaining how to do this is beyond the scope of this page.
ScottMay 19th, 2008 at 12:28 pm
Thanks anyway, Scott.
gofreeMay 19th, 2008 at 12:55 pm
Hi,
i love this plugin and i’ve installed it on my server.
Only a question, how can i use this plugin in different page with different code?
Example:
I need that on the homepage this plugin give me only three featured post.. but i want that on “archive” this plugin give me ten featured post (of the same categories).. is it possible?
Thanks.
SkaAndrea
May 26th, 2008 at 9:13 am
I found it,
Skathanks anyway
May 26th, 2008 at 9:50 am
Hey great plugin… coming in handy a lot!
Works great for me right out of the box.
Thanks!
Chris McCorkleChris
May 27th, 2008 at 12:19 pm
Excellent script.
rogerI wanted to modify it so that it only displays the posts title, and reduce the space between the
“featured post:” headline and the posts title.
June 1st, 2008 at 6:02 pm
@roger
If you want to eliminate the post content/excerpt you’ll have to modify the code… look for the echo lines near the end of the code. I’ll think about adding this as an option next time I update.
You can reduce the space between elements using CSS, but I’ll leave that up to you, I’m not an expert.
ScottJune 2nd, 2008 at 11:09 am
Hi Scott and thanks for this plugin.
Is it possible to display featured posts by tag and not by categories?
AldoJune 7th, 2008 at 7:33 am
Hi, Scott. Nice Plugin, Iam trying to display random posts from the Feature Category on the home page,above the normal content, but if the post is the latest post and is from the featured Category, There are duplicates being displayed.
Can you suggest how to remove the 2nd duplicate, and let the random post from your plugin be displayed on the homepage.
venkatJune 9th, 2008 at 5:36 am
@Aldo: I’ll put it on my to-do list, but it might take me a while to get to it.
@venkat: The best I could do is return the post ID from the function. Then it would be up to you to check for the post ID as you go through the loop. Would that work for you?
ScottJune 9th, 2008 at 9:29 am
please help i got this error :
————–
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) ORDER BY RAND() LIMIT 1′ at line 8 on line: 202————–
i use WP 2.3
regards
dr801June 11th, 2008 at 6:23 am
@dr801:
It looks like you haven’t selected any categories in the options pages.
ScottJune 11th, 2008 at 8:25 am
Scott… great plugin.
One issue: I am using another plugin “Custom Field Images”, so that I could place an image ABOVE the Title. This works fine on the Full Post, however to get a thumbnail, I have had to add it separately into yet another custom field, which does not now show up in “Random Featured Posts”.
I know there is another way of getting the thumbnails in place, and that is by creating an extract option, and duplicating.
I am unsure what to do!
Any suggestions? See index page with one example of Painting with title below, that appears in my Mini-post view below the Featured Post.
Thanks
PeterPeter
June 14th, 2008 at 7:35 am
@Peter:
I’m not clear on what your problem is exactly because I don’t see an image on the featured post of your page; however, this sounds suspiciously similar to the problem Daniel was having (see comment 51). Basically, your other plugin is most likely not compatible with this.
ScottJune 16th, 2008 at 9:03 am
Thanks for the post
Best
diegogueJune 17th, 2008 at 11:58 pm
great wp-plugin!
autworldJune 18th, 2008 at 12:05 am
Hi Scott,
this plugin seems very good. I wonder if this plugin can choose the post date rather than by category. Exactly all posts published in a time interval.
Thank you and sorry for my english.
Alessandro
AlessandroJune 30th, 2008 at 10:49 am
The plugin shows the correct title of the random post but the content is the same of my latest post. Did I something wrong?
NovecentoJuly 2nd, 2008 at 6:09 am
@Alessandro: I’ll see about adding to future version, but I don’t have plans to update in the near future. Sorry.
@Novecento: No idea… maybe you put the function call inside the loop. Also, make sure you’re using the most recent version.
ScottJuly 2nd, 2008 at 11:54 am
The function call is placed before the if (have_posts() loop and i’m using the 1.1.3 version
NovecentoJuly 2nd, 2008 at 6:03 pm
Didn’t know if this would help, but maybe you can use the custom fields to apply a mock category structure to static pages? You know, assigning a key and value that you can call in this plugin to only pull certain pages to display.
Personally, I want to know if it is at all possible to shortcode this plugin so it can be brought into a page, rather than page.php. Like say I want to have my homepage show a page rather than my posts, and put this plugin into the page I select as home, to show a featured post. Basically making this plugin part of one specific pages content. Any ideas?
BrysonJuly 6th, 2008 at 5:01 am
@Bryson:
ScottYou can check for the page ID and only execute the plugin function for a specific page like this:
global $post;
$postID = $post->ID;
if ($postID == 123) show_featured_post();
July 7th, 2008 at 9:47 am
@Scott
Thanks for the quick response. That looks like it might work very well for me, I’ll test it on my home app and see. Thanks.
BrysonJuly 7th, 2008 at 3:37 pm
That works pretty well, except that the page title keeps showing in the page as if it’s just another page. Still gotta sift through it and find a way to drop it from that page since it’ll be my home page.
Also gotta adjust the styling for the output of this plugin since I’m just using it as a part of a page, but rather as the page.
Thanks again Scott.
BrysonJuly 7th, 2008 at 4:06 pm
@Bryson:
Just use the same code as before at the part where the title is displayed except modify the if line like this:
if ($postID <> 123) // display title here
That shows the title on all pages except page 123.
ScottJuly 7th, 2008 at 4:10 pm
I actually went another way, and from the looks of it, the hard way. I’m not a php whiz by any means though I can manage at times.
Here is what I have
[code]ID;
if ($postID == 18) { show_featured_post();
} else { if (have_posts()) : while (have_posts()) : the_post(); ?>
[/code]
It keeps any part of the wp page from showing if $postID is 18, and if it’s not, then I don’t want the featured post to show up, so it goes on to exclude the plugin output in favor of the page content. Works for me
BrysonJuly 7th, 2008 at 5:19 pm
And is it just me, or does IE7 really not like ajax? I couldn’t edit the post to take out the bbcode after it didn’t work. Seems to be like that a lot.
BrysonJuly 7th, 2008 at 5:22 pm
Hi there!
Is it possible to just extract a random page ID to use for other purposes?
I am using the MimboPro theme and would like to present a random leading article from one or more categories.
Best Regards Krezz
KrezzJuly 15th, 2008 at 6:01 pm
take a look at my homepage, http://www.brokesanity.com. Look in the red section of the header and tell me if that’s what you’re looking for.
I used, and quite easily I mitgh add, recent posts plugin to accomplish this.
BrysonJuly 16th, 2008 at 4:51 pm
Thanks this is exactly what i am looking for!
RichardJuly 23rd, 2008 at 7:03 am
I dont why but suddenly it starts to show only full post, and not the WP excerpt anymore. I have checked the option to display excerpt in conf.
MiguelJuly 23rd, 2008 at 1:19 pm