• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • The Famous Blog
    • Blogging
    • Social Media
    • SEO
    • Marketing
    • Design

Famous Bloggers

How To Blog and Start a Business

  • Contribute
    • Submit News
  • Login

Home » The Famous Blog » 3 Simple And Handy WordPress Tricks Without Using A Plugin

3 Simple And Handy WordPress Tricks Without Using A Plugin

April 3, 2010 - Last Modified: April 3, 2010 by Nile Flores 34,305

WordPress Tricks

As A WordPress user of more than 6 years, and before that a b2 user, I really have come to appreciate the advancement of this content management system. However, there are a lot of people relying on a little too much on plugins. It is not necessarily a total faux pas to rely on them, but you certainly can eliminate a few unnecessary processes that could run up your database resources.

So, let’s start…

Simple tricks you can add to your WordPress site without a plugin!

These tricks you can copy and paste into your theme’s functions.php file. Sounds simple, right? It really is!!!

Limit Excerpts

This simple trick will help you specify how long you want your excerpt to be. For those who want a good example, Blondish.net, my site exercises this trick as well as the others in this article. Copy and paste the code into your functions.php page. To specify the number of words you wish your excerpt to display, change the default number 75 to the number you want. For example, on my site, I use 100.


add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($len) { return 75; }

Theme Support For Thumbnails

Thumbnails have become really popular and there are a few variations of this trick. However, there are few that actually delve into talking about theme support. This little snippet of code will allow you to choose a thumbnail by loading one up to your WordPress media library.

In order to do this, you need to copy and paste the following code in your theme’s functions.php.


add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 200, 200, true ); // Normal post thumbnails
add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size

After you have added the above code to your functions.php file, you can add this to the index.php and single.php files if you want. This requires inserting a code into the layout to call the thumbnail into the post.


<div class="attachment-post-thumbnail">
<?php the_post_thumbnail(); ?>
</div>

Once you do this, you need to adding into your style sheet some CSS. For example:


.attachment-post-thumbnail {
float:left;
margin:5px;
}

When you go to post, there should be a new field box that says “Thumbnail” that you can set your image. Load it up, and right next to the button that says “Insert Into Post”, is “Set Thumbnail”. Click that and when you publish your post, your thumbnail should show up. 🙂

Replace Excerpt Ellipse

A lot of people really do not like that WordPress puts in excerpts an ellipse. An ellipse is famously seen as […]. A lot of times this does not have a URL. For those who use excerpts, you can replace the More or ellipse with a filter in your functions.php file of your theme. For example, I use Read More and have the article’s permalink anchored.


function excerpt_ellipse($text) {
return str_replace('[...]', ' Read More →', $text); }
add_filter('the_excerpt', 'excerpt_ellipse');

Each of these also have plugins that do similar jobs, but why use the plugin and use extra space? Keep it simple! 🙂

Do you use something similar? Does your theme already come with some of these functions?

ShareTweet

Filed Under: Wordpress

About Nile Flores

Follow @blondishnet

Sassy blonde mom from Southern Illinois who is a Professional Blogger, AND a WordPress web designer and developer. Nile loves to help others rock out their blogs and social media handles. If it was not already apparent, she is addicted to WordPress, Blogging, Social Media, and in general, anything about the Internet. It is not uncommon to see her speak at WordCamps (WordPress conferences) and blogging conferences across the United States. Her website is Blondish.net.

Reader Interactions

Related Posts

  • Blogging Limiting Beliefs about Money5 Blogging Limiting Beliefs about Money that You Need to Release
  • What’s Up Bloggers! Roundup #8 with Don Sturgill
  • What is Keeping Your Blog from Making Money?What is Keeping Your Blog from Making Money?
  • Start new blog post10 Techniques how to Start a Blog Post to Engage Readers to Stay on Page

{ 35 Responses }

  1. Sakthi Kumaran says:
    Hi Nile, Thanks for sharing these handy WP tricks. I blog on WordPress niche and I'm a WordPress theme designer as well. I aware of the thumbnail theme support trick without using the plugin and good to learn the other tricks. It would be better to avoid using the excessive plugins to make our site load fast and yes, you have shared some exact tips for it. Keep up your great work, good to know about you and your blog.
  2. Darrell Harris says:
    Really a great post explaining the basics about wordpress to me,I really liked the excerpt hack thanks for sharing.
  3. Jack says:
    Thanks for the codes, Nile! I had been having some issues with my thumbnail images earlier. The code you gave solved them! Best regards, Jack.
  4. Nicole Hanusek says:
    Thank you for sharing this, it just solved a featured image problem for me. And now that I know about it I'm sure it will come in handy for future projects!
  5. Nick says:
    any one here help with my site pls
    • Nasif says:
      huh ?! :s
  6. Nick says:
    Hi, your code is not work on my theme as i use http://wordpress.org/extend/themes/easel, which you can see my site www.nsneakers.com. The problem is the featured images can't get Thumbnailed, it only shows full image size on post, index, category and tag. Other Thumbnail images in the post work fine. Can you help?
  7. Vijayraj Reddy says:
    i have lowered the Limit Excerpts as it was exceeding my thumbnail image...
  8. Darren Scott Monroe says:
    Hey Niles remember when it used to be MAJOR difficult to even setup let alone HACK wordpress to your advantage? LOL Hey good ideas .
  9. Rodger says:
    WOW. Thank you. I didn't know how to remove the ellipse. It is quite annoying, since it doesn't do anything, and now I can link to the article.
  10. Dvd Training Video says:
    I rarely do manual tweaks because I'm always concerned about theme updates and losing any changes I've made. I did break down last night and actually edit a php file to add a slide out tab! : ) Anyone know of a really cool way to create a tab slide out that allows resizing of the widow to exact desired dimensions? I want to place a YouTube video in the slide out winow.
    • Codrut says:
      You're right. I'm not a coder, so I dislike breaking codes. That's why I prefer plugins. So more to tweak without a single html code touch. Britt, you might look up for a Youtube related plugin that does that, did you try finding one yet?
  11. AJ says:
    Nice quick tips - I am a huge fan of manual work as opposed to using plugins. It is a great way of keeping your site fast!
  12. Asad says:
    Post excerpts are really good for seo of the blog and save your blog from duplicate content penalty of search engines.
  13. sağlıklı diyetler says:
    From starting to the ending ,it is just great .Thank you veyr much . .-= NEW from sağlıklı diyetler´s last blog ..Güney Sahili Diyeti =-.
  14. Blogging Tips says:
    Gr8 ! I am a newbie to WP and this is really helpful to me. .-= Blogging Tips´s last blog ..Blogging Tips Contest – Win upto $180 worth prizes =-.
  15. Onibalusi Bamidele says:
    This is really a great post explaining some basic things about wordpress. I never thought all this can be done just by editing some line of codes. Thanks .-= Onibalusi Bamidele´s last blog ..Google Pagerank Update 2010 is complete =-.
  16. Josh Kohlbach says:
    It's surprising how much you really can achieve without the over use of plugins. I'm with you, I think people rely on plugins far too much instead of taking the time to understand some simple theme programming. I personally developed a new site with the intention of making less use of plugins to make the site faster. I've done a few of these tips including the thumbnail one and the excerpts limiting. It's really not that hard. .-= Josh Kohlbach´s last blog ..StumbleUpon: My Stumble Your Own Stuff Experiment =-.
    • Codrut says:
      Now sure how simple it'd be. Yes, it takes time but I think it's more about the fact that bloggers have been conditioned to using plugins instead of manual code cracking.
  17. Dave Doolin says:
    I should add, these are *excellent* little suggestions, the excerpt example in particular is something I've been needing to get handled. My previous comment is probably a little too far down the rabbit hole! .-= Dave Doolin´s last blog ..Writing About Money on Easter Sunday? Yes! And here’s why… =-.
  18. Dave Doolin says:
    Well, this is all cool, but plugins allow for theme-independent code. Given adding code to functions.php or writing a little plugin for my own use, I'm as inclined to write the plugin. That way I can at least track my code in subversion or git, and never, ever have to worry about functions.php getting stomped by an upgrade or whatnot. I have to admit I don't have that much WordPress experience... but I've been coding C since 1994, and the worst complexity always erupts on the code management side, not the code itself. I understand the penalty for reading yet another file from disk, but caching takes care of some of that, and the benefits for managing my development process are very strong. .-= Dave Doolin´s last blog ..Writing About Money on Easter Sunday? Yes! And here’s why… =-.
    • Nile Flores says:
      Actually these snippets are theme dependent... not the plugins. For example... these work like framework themes do like Thesis to add more functionality to both the front end and the back end without messing with the core or using database space. :D .-= Nile Flores´s last blog ..What Makes a Successful Blogger? =-.
      • Dave Doolin says:
        Nile, rereading both your article and reply, I think we're in "violent agreement." I signed up for your RSS feed, I should poke around your site a bit before going further. BTW, if you're interested in WP plugins, hit me up. .-= Dave Doolin´s last blog ..Writing About Money on Easter Sunday? Yes! And here’s why… =-.
  19. Dennis Edell says:
    Do the two excerpt tricks interfere with a full feed? This is why I use a plugin for it. .-= Dennis Edell @ Direct Sales Marketing´s last blog ..Blog Comments and Blog Comment Contests – Lets Chat about Paying for Comments =-.
    • Nile Flores says:
      Hi Dennis! No, these only effect the_excerpt filter in your theme layout, not something like your full content posts and your RSS feeds. .-= Nile Flores´s last blog ..What Makes a Successful Blogger? =-.
      • Dennis Edell says:
        Just to simplify, I will still send full feeds, yes? .-= Dennis Edell @ Direct Sales Marketing´s last blog ..Comment Contest and Bonus Winners – March! =-.
  20. Anne Moss says:
    Good to see someone actually working with a few lines of code rather than a plug-in! .-= Anne Moss´s last blog ..Amazing Grace – Cirque Du Soleil Juggling Show =-.
    • Nile Flores says:
      Thanks! It is just much more logical to try to keep these type of functions simple rather than elaborate it with a plugin that takes a lot more time. The functionality is there already so these work with those attributes rather than go the round about way. :) .-= Nile Flores´s last blog ..What Makes a Successful Blogger? =-.
  21. Gautam Hans says:
    I think the thumbnail hack works for wordpress 2.9+ and i have recently employed it to my blog and found it to be really impressive. I personally liked the excerpt hack and will emply it in my blog :) Thanks for the tip .-= Gautam Hans @ Blog Godown´s last blog ..5 Conversion Rate Optimization Tips for Bloggers =-.
    • Nile Flores says:
      2.9+... you are correct. :D I found it much easier to incorporate into a layout versus other thumbnail hacks... plus, it works with your WordPress Media Library. .-= Nile Flores´s last blog ..What Makes a Successful Blogger? =-.

Primary Sidebar

Our Newsletter

Our Newsletter

Join our mailing list to receive the latest news and updates from our blog.

You have Successfully Subscribed!

Popular Articles

  1. Top 10 Sites Where You Can Get Paid to Write 115,645 views
  2. How to Get Targeted Twitter Followers Fast 92,035 views
  3. How to Set Half Rating Scale 1-5 (Poor to Excellent) by Words 86,451 views
  4. 66 Awesome Social Media Quotes 78,367 views
  5. 50 Traffic Sources You Should Milk Like Crazy 75,080 views
Schema Structured Data for wordPress
  • Blog
  • Contribute
  • About Us
  • Contact Us
  • Disclosure Policy

Copyright ©2020 · FamousBloggers - All Rights Are Reserved · Powered by Genesis Framework

  • Login
Forgot Password?
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
Go to mobile version