5 Solutions to Common WordPress Problems

Is WordPress giving you a headache these days? I understand.

Let’s admit it. WordPress is an unbelievable blogging tool. Millions of businesses and bloggers are using WordPress as the foundation of their website or blog. But, like your mother always told you, “Nothing is perfect in life… even WordPress.”

So, you see, if WordPress was so damn perfect, there wouldn’t be anything to debate about it, let alone blog about it. In this article, I will present to you 5 common problems that are raised along with their 5 solutions. If you want to make your WordPress blog even better, I suggest that you keep reading.

  1. How do I add a custom logo on my WordPress dashboard?
  2. Sick and tired of seeing that WordPress logo sitting at the top-left corner of your WordPress dashboard? Well, luckily there is a way to replace the image with your own custom image. Maybe, at the end, you will end up with something as sexy-looking as this:

    Custom logo fail?

    The image must be around 30px wide and 30px tall. Save the image to your theme’s image folder (/wp-content/themes/theme-name/images). Then, open up your functions.php file and insert the following code:

    //hook the administrative header output
    add_action('admin_head', 'my_custom_logo');
    
    function my_custom_logo() {
    echo '
    <style type="text/css">
    #header-logo { background-image: 
    url('.get_bloginfo('template_directory').'/images/custom-logo.gif) 
    !important; }
    </style>
    ';
    }
    

    Remember to change the link info of your image if it is not the same as custom-logo.gif
    Source: WP Beginner

  3. How do I create a mobile version of my WordPress blog?
    If you’re feeling awfully lazy and would like a simple three-step solution to creating a mobile version of your WordPress blog, I suggest you take a look at some of these WordPress plugins that do just that:

    SpyreStudios recently published an article listing 10 tools you can use to create a mobile version of your WordPress blog. I recommend reading it for more information.

  4. How do I delete post revisions from my database?
  5. Over the course of publishing several articles on your WordPress blog, your database will begin to accumulate a large amount of post revisions. This can eventually clog up and increase the size of your database, which is of course not good. To delete all the post revisions saved to your database, log into phpMyAdmin and select your blog’s database. Then, enter the following SQL query:

    DELETE FROM wp_posts WHERE post_type = "revision";

    What this code does is essentially look for the wp_posts table and delete all posts with revisions saved to it. Hopefully, this will speed up the response rate of your database and save you a tremendous amount of space.

    If you want to limit how WordPress saves post revisions as you write new articles, you must edit your wp-config.php file and insert the following line of code:

    define ('WP_POST_REVISIONS', 5); //Defines a maximum of 5 different revisions per post.
    define('AUTOSAVE_INTERVAL', 3600); // Auto-saves on 1 hour interval

    Line 1 sets the maximum number of saved post revisions to five per post. Line 2 changes the default setting of autosaving from 60 seconds to one hour.

    Source: WP Recipes and WPBeginner

  6. How do I create a custom WordPress login screen?
  7. Damn, that's sexy.

    Michael Martin from Pro Blog Design wrote a great article on how to create your own custom login page. Go check it out.

  8. How do I add a “Print This” button in my posts or pages?
      Of course, there are plugins that can do the job for you. Two that I recommend are PrintFriendly and WP-Print
      Source: WP Hacks
  9. If you have articles on your blog or website you would like readers to be able to easily print, than simply paste this javascript into your single.php or index.php file:

    <a href="javascript:window.print()" rel="nofollow">Print This!</a>

    While this method is painfully easy, I wouldn’t recommend it because it simply does the same thing as going to your browser’s options and clicking on print. A better way would be to create a separate style sheet specifically for printer-friendly pages:

    body, input, textarea, select {
      color: #000;
      background: none;
    }
     
    ul.primary-links, ul.secondary-links,
    #header-region, .sidebar {
      display: none;
    }
     
    body.sidebars, body.sideber-left, body.sidebar-right, body {
      width: 640px;
    }
     
    body.sidebar-left #center, body.sidebar-right #center, body.sidebars #center,
    body.sidebar-left #squeeze, body.sidebar-right #squeeze, body.sidebars #squeeze {
      margin: 0;
    }
     
    #wrapper,
    #wrapper #container .breadcrumb,
    #wrapper #container #center,
    #wrapper #container #center .right-corner,
    #wrapper #container #center .right-corner .left-corner,
    #wrapper #container #footer,
    #wrapper #container #center #squeeze {
      position: static;
      left: 0;
      padding: 0;
      margin: 0;
      width: auto;
      float: none;
      clear: both;
      background: none;
    }
     
    #wrapper #container #header {
      height: 130px;
    }
     
    #wrapper #container #header h1, #wrapper #container #header h1 a:link, #wrapper #container #header h1 a:visited {
      text-shadow: none;
      color: #000;
    }
    
    Apologies if any of your problems are not answered here. Let me know what you would like to learn more about in the future!
  • http://www.jennamolby.com Jenna Molby

    Good Post. I’m going to have to try the logo one.

  • http://www.lonewolfrepose.com lwr

    Excellent tips. Been trying to do a “printer friendly” thing for awhile now.

    • http://loneplacebo.com Tony Hue

      Glad to hear it helped!

  • http://electricego.crinz.com Electric Ego

    Good tips. These are really some common problems newbies face. One common problem is how to set words limit in RSS feeds wordpress generates…it is either full feed or an excerpt….users want to have control over feeds’ word limit…Have any solution for that?
    .-= Electric Ego´s last blog ..Shayad Main Zindagi ki Sahar leke aa gaya =-.

    • http://loneplacebo.com Tony Hue

      Interesting question. I’ll take a look into it. If I don’t reply…well, there you go.

  • http://electricego.crinz.com Electric Ego

    I’ll be keeping an eye on your blog in case you find out a solution. Looked up quite a few RSS related plugins….none was specifically tailored to resolve this issue. Thank goodness the question was asked by my friend, not a client.
    .-= Electric Ego´s last blog ..Weekly Twitter Updates for 2010-03-21 =-.

    • http://loneplacebo.com Tony Hue

      Alright, so I did some research and found in the WordPress Codex regarding the template tag: the_excerpt that you can the set character limit by editing your theme’s function.php file. By default, it displays the first 55 words of a post. To change that default value, simply include the following in your functions.php file:

      function new_excerpt_more($more) {
      	return '[.....]';
      }
      add_filter('excerpt_more', 'new_excerpt_more');
      

      Unfortunately, I don’t think this specifically targets the RSS Feed alone, which you are looking for.

    • http://loneplacebo.com Tony Hue

      Found another solution purely outta luck! Not sure if it works, though. Log in to Feedburner, go to Optimize, then click on Summary Burner, and set the character limit for your articles. Voila!

  • Pingback: How To Add A “Print This” Button In Your Blog | TutZone

  • http://electricego.crinz.com Electric Ego

    This one is quite neat. ..though won’t be called a wordpress hack….I was looking for something right inside wordpress..for you’d first have to switch to feedburner to burn your feeds and second, provide it full feeds to have better control over character counts…still, this one is very helpful..

    Sorry I took so long to respond this time!