Jun
30
2010

how to display Popular Posts in wordpress without using any plugins?

i want to display popular posts in my site without using any plugins…is it possible to accomplish??

 Mail this post

Popularity: 2% [?]

StumbleUpon It!
Written by Linux Fan in: Plugins |

1 Comment »

  • AIT-pro.com

    Hmm very interesting question. Yes you can always hard code your Popular Posts to display in your sidebar in WordPress (and in your WordPress template file or files instead of the sidebar) instead of using a plugin, but why would you want to for something as simple as this? I’m sure you have a good reason for not wanting to install a WordPress plugin or maybe you can’t install a WordPress plugin for some reason?

    You can always use the Text Widget in WordPress to add whatever "raw" code you want to add to your sidebar instead of putting the hard coding into your WordPress Theme’s sidebar.php file.

    I googled "how to display Popular Posts in wordpress without using any plugins?" and I found some hard coding examples of stripped down and very simplified Popular Posts code you would add to your sidebar.php file. All the examples I found are actually too simple and do not contain I18n Internationalization appropriate code and other coding functions that should be there so I am not going to add the links here.

    It would be better to take the code from a Popular Posts plugin that has already been created and then put that code directly into your sidebar.php file or add the code to the WordPress Text Widget. The reason I recommend this is a lot of careful thought goes into creating WordPress plugins: International functionality, security, compatibility with all versions and themes, etc etc etc and WordPress plugins have to go through an approval process with the WordPress people before they will allow a plugin to be accessible from their WordPress Directory.

    So I would be very careful about using some code you find randomly on the Internet. Sure it may work, but what other important coding might be missing? I have written one WordPress plugin so far, the BulletProof Security WordPress plugin, so I fully understand what is required to make the code completely clean, secure, universally functional, internationally usable, etc etc etc. Using my WordPress plugin as the example. If I just wanted to use my BulletProof Security coding for my WordPress site alone the code would be around 100 lines of code. To make it work for everybody else there is around 440 lines of code in the core file that does the actually work and it is of course obviously hacker proof.

    Anyway in your particular case you are looking for coding that performs a simple task where you probably don’t have to worry about things like a security breach or hacker exploitable code so you should just be thinking more about ease of use down the road. ie if you need to change something how long does it take, etc etc etc.

    Also I just wanted to mention this in case this is all about being able to customize the visual appearance of what is being displayed. All website elements in WordPress can be visually customized by using CSS in the style.css file that is included with all WordPress Themes.

    Good luck!

    Comment | June 30, 2010

RSS feed for comments on this post. TrackBack URL

Leave a comment

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes

Powered by Yahoo! Answers