Plugin with multi-widget functionality that displays most recent posts from specific category or categories (set with user options). Also includes user options to display: Author and meta details; comment totals; post categories; post tags; and either full post, excerpt, or your choice of the amount of words (or any combination).
100 Responses
99 Comments
1 Pingback
The field “Total Posts” has a bug? The max number of posts to be displayed is the max number of posts in the page?
@Hernã – Yes, the “Total Posts” currently has a maximum value equal to the total posts to be displayed on a page (as set in the Dashboard under Settings | Reading). Although I would not consider this to be a “bug”.
It is already on my “To Do” list to add a dynamic note on the options panel to reference this quantity (as it is set by each user to their own preference); and, I am also making a note of your idea to expand on this.
Thank You.
Is there any chance this could include thumbnails and an option on the widget page to limit the number of words? It’s almost exactly what I’m looking for, and that would make it perfect!
@Greg – Those are some very interesting ideas. I like them both. They will definitely be on my list of items to review for this plugin.
If it could be configured to work with timthumb and use an existing custom field (with new dimensions), that would be perfect!
@Greg – I will take a look at timthumb as well in the review process. Thanks for this idea, too.
Glad to be listened to 😀
I just have to figure out how to fix the styling. I copied all my .post entries in css and made them .widget .post, but it’s not changing anything.
@Greg – If you could note which specific post as a reference point, I would be more than happy to take a look.
Thanks for the great plugin, I’m going to use it for my new design that isn’t active yet.
Again.. tnx!
I like add a simple text in widget, but.. Can you help me? Thanks so much, Lucio
@Lucio – What text did you want to add, and where did you want to add it?
I would like to add a field text formatted (free write) before posts for each category. Like a presentation of each category selected.
Thanks for your atention
Lucio
@Lucio – I believe I understand what you are asking for. Making those changes would be some work. Additional options, and a full text box for typing in would need to be added to the layout. It is an interesting idea, but well beyond a simple solution. I will add the idea for review at a later date.
Although it does give me an slightly different idea: add the first featured category’s description, as an option. This may allow you to “free write a presentation” and is more likely to be implemented in an upcoming release.
@Lucio – Have a look at version 1.6 of the plugin. I have added the Category Description display option that I believe will meet your needs.
Hi Edward,
Excuses for my bad english 😉
Thanks for this plugin which almost suits my needs!
Just a little thing: I’m not a “pro” in php, so do you have just a piece a code which can let me have more posts in your plugin than in my home page???
Explanations: In the second colums of my site, i want to replace the video wall actually in place by a list of “short news”… So i wanted to put them in a single category, and exclude this category from the rest oh home 🙂
Maybe a little change in the code would do that, waiting for a new version of your plugin as explained in an other reply in this page?
Thanks in advance;)
Adding code to override the dynamic maximum post count from the Dashboard is still on the to-do list. I will be revisiting the plugin code soon; and, will make a point of looking at this item again. Thank you for the reminder.
Hey again Cais,
I got this error when I tried to upgrade to the current version:
Cannot redeclare load_my_bns_fc_widget() (previously declared in /home/content/44/4799444/html/wp-content/plugins/bns-featured-category/bns-featured-category.php:22) in /home/content/44/4799444/html/wp-content/plugins/bns-featured-category/bns-featured-category.php on line 23
Got it with both the category and the tag plug-in.
@Paige – First thing to try is to remove the plugin (delete if necessary) then re-install it. I have seen this error before, but I also believed I had corrected it. Let me know … Thanks.
I went to uninstall and it shows version 1.6.2, so I guess it upgraded successfully and randomly generated the error. Thanks for all your hard work!
@Paige – Thanks for the update! I appreciate your time letting me know of the issue you experienced.
Thanks so much
Lucio
Great plugin and thanks for all the effort. Would be nice if we could have template tags.
@finid – Thank you! What did you have in mind for “template tags”?
Basically, tags that could be used to embed the output of the plugin in non-widgetized parts of a theme.
@finid – Ah, yes, that is what I suspected. At the moment it can be done using the_widget() function. This is from “trunk”:
Let me know if you need help with the specific parameters. I have not found documentation for this function beyond what is in ../wp-includes/widgets.php, yet.
@finid – Here is some working “clean” default code you can start with:
thnx for such a wonderful plugin,do have any plans on including the thumbnails function?
That would be awesome.
@shoaib – Thanks for the compliments! Adding post thumbnails is still on the review list, especially with the new functionality added in WordPress 2.9
This plugin works fine for me, but I still don’t understand how to edit the CSS for this… I tried using
.bnsfc-cat-desc {font-style: italic;}
as a test, but nothing changes. I just want to tighten up the spacing between the UL of each post and to have a solid line under each one. (Default is a dotted line?)
Hmm…
@Scott – The basic styling of the items in the widget follows from the styles that would be used by your archive/category template page. I added additional CSS classes so you could modify the widget output to look differently if you wish.
Looking at your website using your “Comix” as a sample, try this bit of CSS in your style.css file:
The CSS you tried above would only affect the Category Description which does not appear to be in use with the Comix example.
That did it! Perfect!! Thank you so much for making this, btw!
That’s great! … and you are welcome. 🙂
Is there any way to apply different style classes to the category headings based on the category ID or name? It seems that they’re just using the widget-header class, but I need to make each category heading look slightly different.
Thanks, by the way, for your work on this plugin.
@Eric – A quick look at what you are suggesting would indicate that a single category class identifier could easily be added to the code, but the plugin functionality allows for multiple categories in the same instance.
In this case, I will be investigating the multiple category modification idea further before releasing additional code. Thank you for the idea!
If you point me in the right direction in the plugin code, I might be able to contribute a patch that does it. We need something like this ASAP for a specific project, so I’m motivated to make it happen 😉
If you are looking at “re-styling” the title, then you will need to work with the code on line 93.
Modify by adding a wrapping ‘div’ around the ‘$title’ variable … without testing, this may work:
NB: Expect this to break (badly) if more than one category is used in the instance.
I cant seem to get the plug in to work (I am a bit new to this though so please bear with me)
when I put in the category title i get the following on the site:
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/tuppence/public_html/wp-content/plugins/bns-featured-category/bns-featured-category.php on line 98
any any idea what I am doing wrong?
Thanks
Craig
@Craig – Thank you for choosing to use the BNS Featured Category plugin. Although I am not certain what is causing your error at this moment, at line 98 the code references the Category choice(s) and the number of posts to show, what specific values are you using?
I tried using the category name as I am not sure where to find a number for the categories ?
@Craig – This article may be helpful with finding IDs in WordPress: http://wpfirstaid.com/2009/12/find-wordpress-id/
Hello! I love the idea of this plugin and the tag plugin but I am having trouble with both of them.
– neither seem to consistently work with the widget locationalizer plugin, which is unfortunate
– more importantly, with featured categories, I’m not able to get multiple instances of the widget to show up in the same widget area or even in different widget areas on the same page
Is this a conflict with the theme I’m using (Atahualpa) or is it a problem with the plugin?
@Zoe – Thank you for choosing the BNS Featured plugins.
Although I cannot speak to the issues you are having in regards to the “locationalizer” plugin, or issues that may result from using Atahualpa I have as proof of concept added the “Showcases” category into the same widget area as the “WordPress” category and I am seeing no issues.
I like your plugin very much, but I don’t know, how to adjust it to the style of my blog. Could you tell me? Thanks in advance, Werner
@Werner – Thank You! The plugin is using the style of your “posts”:
You will need to add element(s) that reference the plugin content more specifically. Try looking at something like this:
Thank you for your support. Werner
Hi,
Great plugin. It is almost perfect for what I am looking for except one thing. How can I make it so the posts are random? I have it set to display 3 at the moment, but it’s just the same 3 each time I refresh the page. I need to be able to sell a featured post section to my customers so need it to randomly display from a certain category.
Any coding I can change?
Thanks
@Darren – You can look at the query_posts() function that is used and try adding more parameters as that is the key to what is being displayed (~ line 99).
Hi,
Thanks for the reply. I took a look at the link you sent, and think I need to add ‘orderby=rand’ somewhere to the coding. Unfortunately I really don’t know anything about HTML so I don’t know where to add it. Any chance you could let me know exactly what I need to add and where?
Thanks
Just installed the upgrade and now most of my front page is gone http://lunarhorse.ist-im-netz.at/de/ When I deactivate bns featured category all the widgets except bns re-appear. I have a back up so I can go back to the last version of the plug in but I leave it as it is so you can see it.
Best wishes
Heiner
@Heiner – Thank you for the report of this issue, but I am baffled to its cause. The ‘undefined function has_post_thumbnail’ is from the WordPress core since version 2.9 and you appear to be using version 3.0.1.
I am unable to re-create the issues on any of my test servers. Although I will be releasing version 1.8.2 very soon (tonight?) the code changes will not be affecting what you site is referencing.
I will keep this in mind as I do my final checks … just in case.
Just in case this helps: Bei Fen (Backup plug in) also doesn’t work any more: Fatal error: Call to undefined method WP_Error::get_item_quantity() in …wp-content/plugins/bei-fen/pages/bf-info.php on line 7 I will now deactivate all other plug ins so I can retrieve my last back up before updating BNS featured category. I willl keep you posted …
Best wishes
Heiner
Deactivated all plug ins, still no success.
@Heiner – Seems you are experiencing more of a site-wide issue than something specific to a single plugin. As you noted the second plugin error, and the incorrect “BNSFC” code was been removed (and subsequently correctly updated as of Sept 21, 2010) I am not certain what to suggest via these comments. Thank you for keeping me advised, it is still very much appreciated.
OK. back to the last backup prior to updating BNS featured category, I had to use a server backup. I will now make a database back up and try updating again.
Now I have tried again. No chance. As soon as I upgrade most of my start page is gone. I’ve gone back to the last version and it is back up. It might be an issue with my theme which is a modification of the BuddyPress theme.
@Heiner – I have not been able to re-create the issue you are describing, and, I do not use, test with, or currently support BuddyPress. What happens if you use a different theme? … or a theme not BuddyPress related?
I have similar problems. After installing the plugin on WordPress 3.0.1 I used the widget on this site http://stoer.de/stoersignale/ and got the error message “Call to undefined function has_post_thumbnail()”.
@Oliver – has_post_thumbnail() has been available since WordPress version 2.9. What version of WordPress are you using?
I use WordPress 3.0.1 (with german language). I took a look. The file post-thumbnail-template.php where has_post_thumbnail() is defined exists in the /wp-includes directory.
Just for info: My WordPress installation is set up to serve multiple blogs. Could this be an issue?
@Oliver – I have often found the issue you are seeing is generally from an out-dated installation. Does this error occur on all of your blogs, or just one in particular?
Edward: First of all I would like to thank you for this very useful plugin.
I’m using BNS Featured Category and BNS Featured Tag in a number of sites I’ve developed, but I have a problem using them: my sites are configured in spanish (es_CL), but every time I use the plugins, the texts displayed by the plugins are in english (like ‘by ‘ or ‘with ‘). Is it supposed to translate automatically or does it need to be localized (translated) by you as developer (implementing localization with .pot/.po/.mo files)?
For the time being, I’m translating the phrases INSIDE your plugin’s code, but of course every time the plugins get an update, these changes get lost 🙁
I also would like to customize the text displayed when there’s no post.
I’d be thankful if you can check this.
@Cristian – Thank you for choosing some of my plugins for your use. As to the “internationalization” of these plugins, for the most part they are coded to allow for translations. I add appropriate code structures but I do not provide support for the translation of the plugins.
I am generally happy to include related language files that are submitted for inclusion with the plugin, if you wish to submit yours. Also, I will be revisiting the code to allow for easier translations in the next few updates, but I do not currently have plans to add a .pot file at this time.
I’m wondering if you could give me a pointer as to what to change to make the titles appear in normal, rather than bold font. I’ve changed the appearance of the plugin to match the theme, using the following code:
.
With that in place, the plugin looks like (Recent Blog Entries). I’ve asked also the theme developers, who suggested adding:
… in the beginning, but while it changes the text, it removes the rest of the formatting and it ends up looking like … Any ideas how I should alter the code to make it work so the Recent Blog Entries box and text would look the same as ‘News’? Thank you!
<edited to help clarify code examples>
@Jaana – by default the widget adds a <strong> wrapper around the title of the post; this appears to be what you need to address. You can try this at the end of your style.css file:
… it works on my test sites to remove the bold appearance from the titles.
Sorry, messed up the above by leaving out title. Better post the direct links as I’d probably just end up messing it up again. 🙂 The link to the page as it is with the current code is http://www.fluteofshame.com/ and the screenshot, with ‘strong’ added to the code, is http://koti.welho.com/jfogl/Capture.JPG
And the code change suggested by theme developers is ‘#sidebar #bns-featured-category-3 .hentry strong’ – one of those days when nothing goes right it seems…
@Jaana – Your developer was working along the right idea, you can add the ‘#sidebar to the beginning of the element (above) or you can even leave the ‘strong’ or ‘a’ off but it would be best to have as precise a definition as possible for more specificity leaving less room for issues with other elements.
Thanks a bunch, Edward – adding the `.bns-featured-category strong a {
font-weight: normal;
}` did the trick. It looks perfect now. 🙂
@Jaana – I’m glad it worked out for you!
Edward, could you please tell me how to modify the code to get the thumbnails to link to the posts just as well as titles do?
@Aleksander – This will require a few lines of code to be added to the plugin, please make sure you have a backup as I may not include this with future versions although it is an interesting idea.
At each call of the_post_thumbnail() (see lines: 134, 139, and 144) you will need to add the following before the line:
… and this after the line:
Very nice, thanks! I think you should consider adding this as a selectable option in future releases, because I believe many users would like to have it.
@Aleksander – You’re welcome! This idea is definitely up for serious consideration, especially as an option. I will be looking at it further.
I really appreciate this plugin! and surely i’ll offer you a cup of coffe if you help me with a stupid (i believe) problem.
I’m wondering if it’s possible to link the title of the widget with the category that shows up. example:
title of category: sports <- if you click the title go into sports category's page
shows: sports category's post
do you like capuccino or macchiato? ; )
cheers
@Roberto – Although the idea is fairly straight forward, providing you are only featuring one category; the implementation would be much more involved than a code snippet in this comment.
A brief overview of what I would look at would start with reviewing the ‘$cat_choice’ variable and developing the URL to wrap around the ‘$title’ variable. You would need to look at re-writing this section of the plugin:
HI,
Thanks for the plugin. But since updating today, both your plugin and WordPress to 3.1.1 I am receiving the following error when saving changes
Warning: Cannot modify header information – headers already sent by (output started at /var/www/maristmessenger.co.nz/web/wp-content/plugins/bns-featured-category/bns-featured-category.php:696) in /var/www/maristmessenger.co.nz/web/wp-includes/pluggable.php on line 897
I am using the Mimbo Pro theme.
Any suggestions?
@Rowan – An over-sight on my part when transferring files before committing to the repository left extra line-feeds that are causing this issue. I have updated the plugin to version 1.8.4.1 (extra line-feeds were removed) which will correct this particular issue. I apologize for the inconveniences.
You may have to manually remove the plugin via an FTP client then re-install the latest version.
Many thanks – all now is up and running. Thanks for your quick response
@Rowan – Thank you for your patience, it is much appreciated.
Hi Ed, what is the calling code for shortcode. I’d really like to be able to display a post in a specific part of my site. (page/post).
Cheers
@Chris – The shortcode parameters are in the body of this page (see above); they can also be found in the readme.txt file included with the plugin, too.
Hi Ed, thanks for the quick response. Yes I saw the parameters before posting the comment. What I’m wondering is if there a calling code, not parameters.
For example in some other plugins I use, there is something along the lines of [ shortcode_fb_like_button ] or something similar. but grouped with [ ] .
So I can place into a post page (not into the php.) but the actual content area the in post/page edit section of the wp admin pannel and call it to display there.
I hope Im not being dum and missing something. Be great to get it to work.
thanks
Chris
@Chris – Yes, it works exactly like that, but mind the default parameters as that is what will show if you use just the base “Shortcode: bnsfc”.
Hi Ed, Got it working quiet nicely now with some tweaks to the styling.
http://www.keyaspectscoaching.com/?page_id=21
Thanks for the help.
One other thing, just wondering if there is any way I can select a specific post from a category.
Or would it be easier to use your BNS featured tag plugin and set it to retrieve posts with ‘featured’ as the tag for example?
Cheers
Chris
@Chris – It looks great! Although pointing to a specific post is not built-in by default it can be accomplished with the setup you are using as long as you keep the “Featured Post” to the most current from a specific category and plan ahead with that in mind. Using BNS Featured Tag would be similar in functionality (the two plugins are nearly identical) using and then removing the “Featured” tag as needed.
Hi, this plugin seems to do exactly I’d like… but the featured images are not displaying with the excerpt. I have the ‘use featured image / post thumbnail’ option selected.
I am using a child of twentyten theme, and I’ve also tested it in twentyten and have the same problem.
Do you have any idea why this is not working?
thanks for any help!
@Raquel – I’m not able to re-create this issue. I always test with at least Twenty Ten before I release a plugin, or an update to one, and this is working correctly for me. Do the posts you are trying to display have “Featured Images” assigned to them?
Hi Edward,
Thanks so much for your reply and for trying to help me out. I’m ashamed to say it was user error all along! I’ve just realised I hadn’t added my featured images correctly.
Sorry for wasting your time!
@Rachel – No worries … it happens 😉
Hi Edward,
Although I have the ‘use featured image / post thumbnail’ option selected and I do have a “Featured image” set within the posts i am using, the thumbnails aren’t showing up. I am using a theme called “London Live” and just getting started getting things set up. Any ideas why it might not be showing up? I checked the permissions of the images folder and it was set to 777. My wordpress/php knowledge is pretty basic, so I might be overlooking something simple.
Thanks for your help. Once I get these images working, your plugin is exactly what I was looking for.
– Thomas
@Thomas – I do not see that the plugin is active on your site; without at least that much I cannot hazard a guess to why you are experiencing the issues you are describing.
Hi, I really enjoy your plugin however my current template does not allow me to place the widget beneath my post, just to the side. I was wondering if it was possible to place your widget directly to the theme with CSS? Sorry if it sounds dumb, I am fairly new to WP.
@Zholey – I believe you can use the ‘shortcode’ to do what you are asking for. If you need help with setting up the shortcode I may be able to work through it with you …
This plugin is fantastic, I just added my tweet this buttons to each preview and I’m loving it.
My question: I’m trying to figure out how to change the size of the featured image that appears with each preview. As a php novice I’m having some difficulty. Any help would be appreciated.
PS I’ve tried using the excerpt_thumb parameter to change the image size. No matter what integer I put in for the value, they come up the same. I tried adding px (excerpt_thumb=”50px”) with various values, with this they show up at full size.
@Andrew – I just re-checked and the re-sizing values should be working fine. Just put the number in, the ”px” is not required; and as you noticed it will actually create an issue (that I should add to my TO-DO list for the plugin, thanks).
im having trouble with the shortcode bit – and i know you have explained it already but can you give me an example of a shortcode useing the […] format please.
i tried for ages and im not getting it
thanks
@Rob – Possibly the easiest example is for you to set up the widget in a sidebar with all the parameters you want to use; take a screen snippet of the options panel and send me it in an email. I can then send you back the shortcode for that setup.
Newer Comments »
[…] BNS Featured Category (version 1.4) […]