Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Must-Know Wordpress Tips and Coding Strategies

If you use Wordpress for either personal or commercial purposes, you may have realized that there are a lot of features that you might like to add that Wordpress just doesn’t seem to support. This often leads you sorting through hundreds of available add-ons and plugins to find the tools that might be right for you and your site.

Wordpress is a great tool, and you don’t have to be an expert in web design to use it - in fact, as Fast Company explains, this is part of the universal appeal.  Yet, the more you learn about Wordpress, the more you’ll find that there are a lot of fantastic features hidden under the hood that most people have no idea exist. Some of the existing add-ons that you use may not only be necessary, but they may even be slowing down your website. Here are some of the must-know Wordpress tips and coding strategies to help you enhance your online experience and get the most out of your Wordpress website.

Change Your Avatar from Wordpress 

Setting a custom image for your avatar is good way to make your blog more personal and allow users to connect your image to your brand without having to go through the Gravatar website to do this. The only difference will be that your avatar will only show up on your blog, and will not carry over with you to other sites that you decide to comment on in a guest post.
To do this, first you want to upload an image that plan to use to your Wordpress site. The default size set back Wordpress for this avatar image is 48 pixels, so you’re going to want to resize the image down to that size and use a picture that will not get too pixelated, and save it as ‘gravataricon.gif.’ Then you’re going to want to open up your admin panel, click on appearances, and select the editor option under the subcategories.

From there, it will display all the files that are hosted on your website, and you’ll want to scroll down until you see ‘functions.php.’ Add this Code to that file:

This will result in your custom gravatar being successfully added to Wordpress, and all you will need to do in order to use the new picture you have just uploaded is to edit your profile through the admin panel. Head over to settings and click on discussion, and you will be able select the new gif out of the options displayed.

Get the Most out of Your Photos

Did you know that Wordpress automatically compresses and distorts the quality of your images when you upload them to your blog? The primary reason for doing is to help your website load faster so that users to your website get a better experience. The default compression rate is to display the image in 90% quality.
Now casual bloggers will continue to go about their business without noticing these changes because they may seem minor; however, if you are in the photography business or graphic business and need to give your images the proper credit they deserve, this may be hurting your business. You are going to need a way to showcase the images that you post at 100% quality and give potential clients a chance to see what you can do for them. Luckily, there is a way to turn feature off and it involves going to your functions.php file.
You may choose to access this file by either using an ftp server of your choice and remotely connecting your site, or you can log on to your site directly through the web browser and to your admin panel, then click on appearance, and finally click on editor. Once you open up the file, insert the following code at the end of the file:

add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );

This code when added will modify Wordpress’ natural function to result in 90% quality photos and start to display your pictures in 100% quality instead.

Draw Attention to your Comments

As site owner, you may need to respond to user comments or answer questions on a regular basis. When doing this, it gives off a sense of authority if your comments are in some way differentiated from the regular user. One affective way to do this is to have Wordpress automatically highlight any comments that are posted from your account so that other users can easily find your answers. The first step to do this is to open up your style.css file. You can do this as explained above by either using an FTP or going through your main website admin panel from Appearances >> Editor. In the style.css file, add the following code:

.authorstyle { background-color: #B3FFCC !important; }

This will tell the background of your comments to tell the Wordpress theme to give your author comments a light turquoise highlight every time something is posted from you. Save and head back to the editor option where you’ll want to click the ‘control’ and ‘f’ key on your keyboard and find the following line:

<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"></li>

This line is going to need to erased and replaced with:

<li class="<?php if ($comment->user_id == 1) $oddcomment = "authorstyle";

echo $oddcomment; ?>"></li>

This will result in Wordpress being able to identity the author of the posts to apply the yellowhighlighting that you inserted above. Where you see “user_id == 1” is going to be the requirements for the admin. For this coding strategy to work, your author account needs to have a user id of 1, of you need to change this number out with whatever user your account currently has. The easiest way to find out this number is to go back to the admin panel, click on users, and go to edit your author account. If you look at the url address bar, it will show the user id in the url; if this does not work for your version of Wordpress, you may need to open up your website database through GoDaddy, Hostgator, or whatever hosting service you use, and look it up manually.

Getting Rid of Article Revisions 

If you’re a "one and done" author who doesn’t like to go back and rewrite old articles, why not save some space in your websites database by deactivating this feature altogether. This will stop Wordpress from creating new entries in your site database every time you edit your website and may even help to improve the performance of your website. Head back over to your admin panel, appearances >> editor, and open up the file that is named config.php. Proceed to copy and paste this code into the config file:

//TO REMOVE REVISIONS

define( ‘WP_POST-REVISIONS’, FALSE );

If instead you just want to limit the number of revisions that are saved rather than getting rid of them completely, insert this code and change the last number where you see ‘5 ‘ to exactly how many you want saved:

//TO LIMIT THE REVISIONS

( ‘WP_POST_REVISIONS’, 5 );

Adding Protection to your Admin Panel

If you want to add an extra layer of security to your administration panel and prevent any malicious user from access it, you can make it so that your admin panel can only be access by your IP address.

This coding strategy should be used with caution as your IP address can change if you work in public locations or if you use a VPN to connect to access points away from your home. To do this, you are going to need to have an FTP program to access the directory of your site. FileZilla is an incredibly popular and useful FTP that will be more than capable of doing the job. Next you are going to want to log into your server, and access the main directory. There should be a file inside this section that is named ‘.htaccess’. Open that file and copy and paste the following:

AuthUserFile /dev/null

AuthGroupFile /dev/null

AuthName “Example Access Control”

AuthType Basic

order deny,allow

deny from all

allow from “Insert your IP”

Switch out the “Insert your IP” in the code for the IP of your location. You can find this information by using a search engine to query “what is my ip,” or going to this site.

As you can see, Wordpress offers many different ways in which you can customize your site if you are able to do a bit of exploring and get creative. In addition to some of the coding strategies and Wordpress tips listed above, you can find different codes to customize the look of each page, change the style of particular heading or login page, and make your website represent you and the image that you are trying to portray; you can find some additional codes and information for other customizations on this great article.

Of course, the great thing about Wordpress is that you don’t have to know anything about coding or developing a website to create content and promote users, but users will be able to notice the difference between a blog owner that has put a great deal of time and effort into developing their site and those who have not. If you’re looking to spice up your blog and make it uniquely "you," try out some of these must–know Wordpress tips and coding strategies.

Feeling overwhelmed by the world of coding? Get in touch with Wheel Media, a marketing and web design company, and they'll show you the way!



This post first appeared on Welcome To The Leverage Marketing, please read the originial post: here

Share the post

Must-Know Wordpress Tips and Coding Strategies

×

Subscribe to Welcome To The Leverage Marketing

Get updates delivered right to your inbox!

Thank you for your subscription

×