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).
91 Responses
91 Comments
Edward thanks for the quick reply. I wanted to figure out what’s happening a little better before I responded again – the thumb size is still not changing for me.
I played around a bit, and what’s happening is the thumbnail size is coming up as the size set in my Media settings, no matter what I set excerpt_thumb at.
So if I change my thumbnail size settings (under the Media settings) from 100×100 to 150×150, then upload a new featured image, the thumbnail will show up at the 150 size. Works the same way for reducing the size.
So… would there be a way for me to have the plugin call the full-size image and reduce the size to a set width, rather than use the thumbnail? This is the only way I can think of to avoid re-uploading all my featured images to change the thumbnail size.
Again any help is much appreciated.
@Andrew – The plugin uses the base function `the_post_thumbnail` and an array to resize the image to the value in the option setting. This is essentially what you are asking for already. The only thing that comes to mind at the moment is the question: does you theme support “post thumbnails” to begin with? Looking over the plugin code again, I see that I do not have a check for this theme functionality that is required for the plugin to work correctly. (NB: It’s going on the TO-DO list.)
I am a true novice at all of this and am building a new site for my business. I love the idea of this plug-in but I can’t figure it out. Soooo this will probably seem like a really stupid question, but the category id that is asked for – is prepopulated as a number (1) for that. Where do I find the category id? I only want two categories to show up under “quick tips” and one under “video library” the categories are Quick Tips – Buyer and Quick Tips – Seller. Video would be the category under the video library tab.
Thank you for any help you can give this true novice that is much better suited to selling houses! : D
@Lynn – I wrote this post a while ago, it may help with sorting out your category ID numbers: http://wpfirstaid.com/2009/12/find-wordpress-id/
Wow, great response time… And helpful. Thank you so much! Great plugin by the way. does exactly what I wanted!
how to get the thumbnail to display ? and the text is all squashed together and goes over the widget footer.
@vin – The thumbnail is based on the “Featured Image” of the post, if it is not used then it will not be displayed. As to the text being “squashed together and goes over the widget footer” I cannot say; aside from the meta data being displayed in a particular order based on the code, the balance of the content should be adapting the general styling of the post contents of the Theme you are using.
the featured image IS part of the post, but doesnt work on your widget. i use other widgets to feature posts and they dont run over the boders, yours does.
now its just grabbing posts at random. any fix for that ?
@vin – All of the posts appears to be coming from the same category. I would suggest, if you are having too many issues, deactivate the plugin and find one that you are more able use.
[bnsfc cat_choice='blog' show_count='3']
isn’t working… grabbing from all posts not just the blog. Is there an error with my shortcode?@HumanV3 – … without a reference to your site is is a bit difficult to provide anything more than: I am not certain what the issue is. Otherwise the general format of the shortcode you are using appears fine.
Hi Edward,
Your plugin is great, but I am having a problem using it for my particular situation. I am using a theme that seems to overide the wp posts and cats with its own. So if I attempt to use your plugin, it isn’t able to find the category that I want it to display. Here is an example of the link to a category that I would want to display:
http://mississippishopsmart.com/handyman-contractor-homerepair/wp-admin/edit-tags.php?action=edit&taxonomy=project_cat&tag_ID=3&post_type=project
I think that I would want to add into the code something like:
post_type = ‘project’
but I am clueless as to where I’d place it???? Any thoughts? Even if it can’t be accomplished thanks for putting a great plugin out there.
@Kevan – Although I have not tested BNSFC with any custom post types and how their categories would be displayed, or possibly if they would be displayed based on what I understand you are experiencing, but I will add it to the plugin’s TO-DO list as something to be reviewed.
Thank you Edward for the quick reply and consideration.
Edward, thank you for this plugin. Everything is working as it should except for the [more] tag. It is dead and displaying as (more)…..
very strange.
The site with the error is:
http://lhpmag.com
Thanks for any help you can provide.
@Adam – The (more…) at the end of your excerpts would be derived from your theme and not related to the plugin. Also the plugin uses `the_excerpt`, or the first “X” words from the content (stripped of tags); either way it will not produce a link to the post. This may be something I will look into for future versions. Thank you for the feedback and choosing to use the plugin as extensively as you have.
Hi Edward, 1.9 version have make some problem with Monalisa plugin (emoticons) and with Sexybookmarks. Looks like some CSS problem, i think, with some align or float (emoticons and sexybookmarks buttons doesn’t align properly, they appears in one column instead the original align).
@Enrico – Thank you for the feedback.
It appears the “wp-monalisa” plugin has issues it should be addressing by this notice upon activation:
I would be more than happy to address any conflicts, if they still exist, after the plugin author addresses this message.
As to the “SexyBookmarks” plugin, I am not seeing any issues using the default settings … can you be more specific or share examples of the issue you are seeing?
Hi Edward, Monalisa works fine without your plugin, but when your plugin is actived, emoticons lose their alignment. With sexybookmarks you can see the problem here: http://www.freemodding.it/news/cooling-news/noctua-nf-12-pwm-focused-flow.html or at any other article. It isn’t a great issue, just watch the first button (rss).
@Enrico – I see the RSS feed button you are referring to as having a CSS issue but I do not see BNS Featured Category as active on that page, nor do I see any potential CSS conflicts in the source code for the page; also to note all CSS elements defined within the plugin stylesheet are specifically prefaced with a unique identifier to insure there are no CSS conflicts with other plugins or the active theme. I am also unable to recreate the issue. I do appreciate the feedback and will leave this item on my review list.
As to the Monalisa plugin, it may appear to work correctly when my plugin is not installed but I do not review conflicts with plugins that cause the WordPress core to display messages, or warnings, stating there are issues with the plugin in question. Once that is corrected I will be more than happy to review this issue.
Edward, i think there is some conflict, otherwise i can’t understand why CSS looks fine if i desable your plugin. 🙂 Same issue appears for Monalisa and for Sexybookmarks, so i think can’t be a coincidence.
Found the problem! The problem seems WP-Minify. For some rason, BNS-Featured Category + WP-Minify makes some conflict with other plugins. If i desable WP-Minify, it looks fine.
So, BNS Featured Category + WP Minify > Issues with Monalisa and SexyBookmarks. Without Minify, OR without BNS, issue doesn’t appears.
@Enrico -Thanks for doing the leg-work … I’ve had a report of WP-Minify causing problems with another plugin I have but this is the first instance with this plugin. This give me more to go on.
Thank you for your job, Edward, i love your plugin, that’s why i’m trying to understand the issue. At the moment I have desabled WP-Minify, but I hope you can fix the problem, because WP-Minify give me a better score with Google Pagespeed (95/100 instead 90/100).
@Enrico – Thank you for your patience with this issue. As soon as I resolved a different matter I will be looking at if/where the conflicts may be and how they may best be addressed.
@Enrico – Now that I have found time to start looking at WP-Minify, the most current version is throwing a ‘_doing_it_wrong( )’ error, although it may not affect the issue at hand I still do not review conflicts with plugins issuing errors in their default settings.
Once the WP-Minify plugin author addresses this issue (et al.) I would be more than happy to re-visit this.
Hi, I just installed your plug-in and I’m getting the following error:
Fatal error: Call to undefined function has_post_thumbnail() in /home/warrick/www/www/wp-content/plugins/bns-featured-category/bns-featured-category.php on line 223
Any thoughts on what could be causing this? I’ve already tried deactivating other plug-ins to see if they conflict and the same error proceeds.
@Cat – the `has_post_thumbnail` is a standard function from the WordPress core files. What version of WordPress are you using?
The latest version. v3.3.1
I believe I found the fix.
I added a line to my custom themes functions.php file.
add_theme_support( ‘post-thumbnails’ );
@Cat – Ah, nicely done! I’ll have to add a check for post-thumbnail support in future versions.
Hi Ed,
How do you set the excerpt to 0 ?
I want to only show TITLE & Post THUMBNAIL without the excerpt.
Also how to add more space between the post ?
@Abe – There is currently no configuration that allows for the post title and featured image only. I have added a To-Do to the project to review this possibility, though. As to the “space” between the posts, this is relevant to the theme you are using …
Hi Edward,
How do you add a line between posts ?
Also, How do you set the post excerpt to “0” ?
Thank you,
@Abe – Asking for specific display changes to the plugin will in most cases also require a point of reference such as your web site where you are using the plugin.
Great plugin. I am working on my site (not up yet) and was wondering when I put the BNS featured category on the sidebar so it shows on every post, what code do I change to have it pick random posts throughout the category I have selected so each time a post is loaded the posts in BNS featured category change. Right now it is always the same on every post in the sidebar. Thanks.
@Fred – Thanks for the compliment!
As to making the posts display in a random order:
Change it to:
This is untested, but should work … I will look at adding options to order the posts in the three standard methods of ascending, descending and random in a future update.
Thanks that worked fine. You have a great plug in. I bought and used Recent Posts Pro but it does not function properly in Opera. I have had a lot of readers emailing and complaining. Your program works in all the major browsers I have tested. Chrome, IE, Firefox and Opera. Recent Posts Pro has some pretty cool features but even it lacks a way to indicate “SHOW POSTS OLDER THAN…. and then a date”. This would be an excellent way to draw attention to old posts. I have tried a lot of plug ins but none work well for showing old posts. Instead within Recent Posts Pro I can list the ID of posts that I want to randomly show. It’s a bit tedious but it lets me target those old posts and bring them back to life. You might want to consider that for your plug in. Either or both would work. Either selecting older posts by ID AND/OR selecting a BEFORE DATE to show older posts would work. You could certainly consider charging a small fee for your category plug in when you add those types of features. There is just nothing available that actually works and certainly nothing that is being maintained and updated. Many of these post type plugins are years old and do not work well. Thanks again and I look forward to your next update. Hope you add the random as a select so I can show some recent posts by ascending or descending and others by random. That would be great! Take care.
@Fred – I’m glad that modification worked; it shouldn’t take a lot to add it as an option. Now, the idea of a date range option as well, that is intriguing … I’ll add it as a review item. Thanks for the idea!
@Fred – Just a quick update note … I have worked out the post order option. Although I haven’t released it to the WordPress Extend Plugins repository, yet, it is available for testing purposes from its GitHub repository here. Feel free to give it a run; I’m still playing around with the date range idea.
Checked it out, works really well! I checked it in Opera, Chrome, Internet Explorer, and Firefox and it works fine. I was wondering where in the code the padding or margin is that controls the space between the bottom of the text and the next article – not the space in between the articles, but in the article itself. Hope this isn’t too confusing. Basically, I notice I have a fair gap of probably a full line before the end of the article. I would like to tighten that up a little bit, but I can’t find where the padding or margin settings are for each article being shown. Thanks for all your help! You have a great plug-in. I look forward to further updates!
@Fred – The “gap” between posts you see in the widget output is nearly completely dependent on the theme and its style(s); the plugin’s included minimal style is more for the hyperlink anchors and the shortcode related output.
I kind of wondered if that was the case. I will see what I can do with the theme. Thanks for the reply.
hi im currently using this plugin on my homepage to display my feature posts and was wondering if there was a way I can split the posts into two seperate columns instead of just the one?
@lll – I would imagine this is possible but it would require refactoring a few different places in the plugin code, and most likely adding some additional CSS as well. It’s an interesting idea but not one I will be implementing any time soon, although I will keep it under review as a possible enhancement in a future version. Thanks!
Hi Edward. I love your plugin. It works wonders on my website. But is it possible to make the background of each post change its color upon hover? (to have the entire post box background – including the post title, thumbnail pic and description – turn to another color upon moving the mouse on any element in the box).
@Nadav – A “hover” effect would be interesting but not straight-forward in a generic sense. I would recommend using a CSS :hover property in a custom stylesheet … you could try the ‘div.bnsfc-content’ element or ‘widget.bns-featured-category post’ element. Each may have an unwelcome effect as the first does not include the “block” title and the second extends down to the top of the title in the next post. Also to note, the active theme may have an effect on what is possible although in this case I do not see it as a potential conflict.
Thank you for the reply. I did try the hover property before and ran into strange effects. Now that you mention that div.bnsfc-content does not build the post content inside CSS box elements I understand why I couldn’t get a good hover effect with CSS. Oh, well. It is a great plugin regardless. Keep up the great work!
@Nadav – It’s still an interesting idea I will be keeping note of for future reference. Thanks … and thanks for using the BNS Featured Category plugin.
The thumbnails are not showing up when the widget is included in a sidebar. The theme does support thumbnails because there are a bunch of them already showing up on the page.
I changed the size setting and checked and unchecked the box but still no thumbnail.
@Joe – I appreciate the feedback that you are experiencing an issue with your installation but I cannot offer any suggestions without more details, in this case your active theme would be helpful in seeing how it implements “featured images” as that is the actual post thumbnail the plugin uses.
How would I show the post title UNDER the thumbnail image?
Thanks.
There are two methods that come to mind: 1) Move the elements with custom CSS; or, 2) Re-write the plugin to change its output so the featured image is displayed then the post title. Both options have their benefits and their potential problems.
Any chance you could point me in the right direction? Preferably using method no 2, thanks.
The premise behind, and the direction to take with the second method is quite simply what I already wrote. Find the appropriate code and move it to where you want it to be.
Now, if you want me to re-write the plugin then please feel free to read our WordPress Services page and/or use our Contact Us page to send us a detailed request for the changes you would like. We would be more than happy to return a proposal for the work.
Utilizing your widget via the shortcode setup works great. My question is this: Is there a way to flow category post from the same category into two column displays on a page using the TinyMCE Advanced column shortcodes?
[one_half] [bnsfc cat_choice='1' title='' use_thumbnails ='true' excerpt_thumb ='150' show_count='6' show_cats='true'] [/one_half]
[one_half_last] ****THIS IS WHERE I NEED TO FLOW THE CATEGORY FOR THE SAME AMOUNT AS ABOVE****
[/one_half_last]
Any help is greatly appreciated. NOTE: This would basically make the articles flow from left column into the right column so that 12 articles would be presented in descending order across both columns.
Respectfully,
David
@David – BNS Featured Category essentially creates a custom query for an archive (read: category) version of the_Loop. If the plugin you are asking about can handle that style of the_Loop I see no reason why it would not be able to output the content in the same fashion that is produced by BNS-FC.
Fantastic plug-in and it works in every major browser which is more than previous plug ins I have tried. Thanks! My question is on the title. Is there any way I can add to the .php file or somewhere else, to truncate the title to specific length. I have a lot of post titles that are longer than 80 characters and I would like something like:
“The Is The Title And It Is Too Long ….”
Is this at all possible? I looked at the .php file but could spot where I could put in a truncate command. Thanks!
@Fred – Thanks for choosing BNS Featured Category and thanks for the compliments. This is an interesting idea but not one I would implement as a standard feature / option with out some significant testing, but the plugin can probably be modified to accomplish this specifically with your needs in mind.
Look at line 254 in the main plugin file where you will find
<?php the_title(); ?>
… you can try changing that to something along these lines:<?php echo substr( get_the_title(), 0, 79 ); ?>
Also to note, make a backup of your work before making any modifications; and, make a backup of the modifications for future reference as they will be over-written with the next plugin update.
Hi, I ove your plugin!
I am wundering how to link to whole with the_permalink();
I am really frustrating, If I put the following code, it doesn’t link the div bnsfc-content, it appears before the div
<a href="”>
…..
please help me.
my HTML tags are cutter….what I want to say is, how can link the div bnsfc-content with the_permalink. thanks 🙂
@elham – I’m not understanding what you are trying to accomplish, could you provide more details?
@elham – You can use the code tags for your example or simply write it with standard text leaving spaces around any < or > symbols
Great plugin, but is there a way to lengthen the except, say for instance I want the excerpt to be about 220 words? Everytime I am trying to enter the amount (220 words) , the required amount is not showing up on the front page. Any suggestions!
@Ren868 – The plugin’s excerpt option is meant to be used as a limiter causing the excerpt being displayed to be less than the default of 55 words. You might look at using the
tag in your posts and then having the plugin display the entire content of those posts. This isn’t tested but in theory it should work.
I’m using your Featured category widget and I love it, except for one small issue. At the end of my excerpt where you’d typically see “Read More” mine displays a ∞. Now I know that this may be due to my template but how do I go about changing it?
Thanks,
Jim
@Jim – I thought I had added a filter for this (it’s going on my to-do list for the plugin) but if you look around line 632 for the $bnsfc_link variable you will see the ‘∞’ HTML entity being used, just replace that with what you want to use. I plan to add a filter so that it is more easily accessible rather than having to directly modify the plugin code (which will be over-written with every update).
PS: Thanks for using the BNS Featured Category plugin! EAC
PPS: A working version with the “new” filter to change the infinity symbol is available from the GitHub repository here: https://github.com/Cais/bns-featured-category EAC
how I can change the margins between photography and text? http://images.forum.ad/imatges/marges.jpg
thank you
(not if you’ve already posted this, but my level of English I find it hard to find)
@Jaume – Although most of the styling used by BNS Featured Category is actually taken from the current theme, you can look at this specific element to adjust the margins around the image(s) you want to address:
Those are just sample numbers for you to start with.
Thank you very much, solved.
One suggestion: the number of words in the excerpt’s is title + text.
always equal to define the text around a photo might be better to put only the number of words in the text, although the title is very long.
Look at the example:http://images.forum.ad/imatges/excerpt.jpg
both are set to 55 words
thanks again
@Jaume – The plugin only uses what the end-user has already entered into their site. If they choose to use long titles then that is what the plugin will display, if they choose to not use a custom default length then the plugin will use what the site has for the post’s excerpt, which again is solely based on what the end-user has chosen: either the default (WordPress uses the first 55 words); or, what the end-user has specifically written.
The only thing to further consider at this time is an option I have chosen not to add, which is limiting the characters/words shown from the title. In my mind this could be too many unexpected displays and would be a feature very few would use. Although you are welcome to make those edits or have someone else make those edits for you if you wish.
Hi
Is there a way of only showing child categories and not the parent category using BNS?
thanks for your help
Although there currently is no option in the stable release of BNS Featured Category, I did just add some “alpha” code you can try if you like.
Just download the latest version from GitHub here: https://github.com/Cais/bns-featured-category
Then over-write your existing installation with it … use at your own risk as this has not been tested. The code make break everything but in theory it should work.
I haven’t decided if I will keep it in the plugin, so let me know if this works and I will consider it.
Hi
I implemented the changes and it generated the fol error:
Catchable fatal error: Object of class stdClass could not be converted to string in /data/20/3/59/0/3385326/user/3775404/htdocs/wp-includes/query.php on line 1475
thanks
My bad, I missed some basic data manipulations in the code. It should work much smoother now. Please give it a try when you can … and my apologies for the delay.
Hi again! I have used your BNS featured category since early 2012! I have learned a lot about modifications but one thing I have never been able to do is figure out how I can change the title font size in the plugins CSS. I was back working on it tonight and thinking about that again. Is this all dependent on the theme or is there a setting I can change? Thanks
@Fred – Thanks for reminding me about this … I meant to put a wrapping class around the widget output and it appears I still need to do that. Since this is currently the plugin on my development desk I’ll make a note to add one. With that, you should be able to more easily use more specific CSS than your theme to adjust the font size. In the meantime, you should be able to pick out an appropriate ID from the page source for the instance of the plugin and work with that as well.
Thanks Ed
I really appreciate it. With more and more sites become more complex in layouts, plugins like yours are even more important. If you don’t mind me asking, how would I reference the title though through AA page source ID? Not being a programmer I am a little unsure here after reviewing the code how to reference it. Any advice is appreciated.
I figured out a way in the php file to add an h2 or h3 (whatever you would want) to the title code. Works well for now. I look forward to your update.
One thing I have always had trouble with is setting up the image size. A lot of the time I need width and height as I have images that are rectangular. Any possibility of adding that in?
Whatever the case I will be buying you a coffee AND a donut with the next update. Hope you like donuts.
Thanks for such great work and plug-in. (I also use the BNS featured tag plugin as well).
@Fred – If you are referring to the Featured Image functionality, the option is there to create a square image which I felt suited sidebars / widgetized areas much better than what might happen if both dimensions were exposed. It probably wouldn’t be too difficult to add the second dimension but I do not currently have any plans to expand that part of the plugin’s functionality.
I can understand not adding it but a lot of sites have rectangular images and squaring them off never really looks good. I have also used another recent post widget that allows for setting both dimensions and it solves those who need a rectangular image. A couple of the wordpress themes I use are rectangular images as they are related to photographs so it is nice to be able to alter the image size for specific photos to keep the aspect proper for readers.
Just an opinion for sure.
@Fred – I agree a lot of sites have rectangular images and for the most part they are also the most correct in the aesthetics they provide for the actual posts using them.
The intent of this widget is to provide an archive like display of the featured category, or categories, and the squared thumbnail suits the aesthetic I was looking to achieve.
Perhaps an expansion of the shortcode functionality may be a better place to consider the additional dimension but then I would be looking at a much larger and more complex refactoring of the plugin.
You are always welcome to fork the plugin and implement your ideas of a rectangular thumbnail. I would be happy to review the pull request.
Hi
great plugin – how can you set a default featured image within the plugin?
thanks
@k – The plugin does not offer a default Featured Image option. The plugin uses the featured image as set in the post, if your current theme supports that functionality, and you set the plugin option accordingly.
I wanted to use it as a shortcode but as soon as I add show_count parameter it ignores the title parameter…
@Dobert – Your shortcode structure is incorrectly written … there are no commas used (which really doesn’t change much), and the `count` parameter is not to be used. You should be using the `show_count` parameter in its place.
Try the following:
Thank you Edward for swift reply. Now it works like a charm 🙂
Great job with that plugin!
One more question if I can – how to use display_children parameter? I get all posts from all categories when I do it like this:
Now I realized I miss one option in the plugin – sorting alphabetically – adding this would make it ideal 🙂
@Dobert – Sorry for the long delay in responding, I missed this comment when it was made and just realized it needed to be addressed still. I have looked into this and see that there was some logic and sanity checks that needed to be made. It should work more correctly in the next release. Hopefully in a day or so … or grab the latest version from GitHub here: https://github.com/Cais/bns-featured-category
« Older Comments