5 Easy Ways to Righteous WordPress Coding


WordPress is considered to be the most user-friendly and easy to use content management system. Even a lay man, who has zero technical knowledge can build and manage websites using WordPress. No such need of touching the back-end coding ever arises while you are using this scalable CMS. There are, however, instances when some issues arise that might need to be addressed technically. WordPress coding

You may even need to do some hard core coding. What would you do in such situations? Panic? Call for help? Well, we suggest you to just keep reading. Yes! It might sound unbelievable but to deal with day to day coding issues in WordPress, all you need is a editing compatible WordPress website and some basic know how about PHP coding and you can tackle your WordPress coding issues like an expert. Here are some great tips that will assist you further in becoming a WordPress pro.

Getting Custom Field Value

If you are dealing with thumbnails in your WordPress site, this tweak can be very helpful for you. Custom fields in WordPress can be used for directly transferring values from the code into your posts. There are several functions that can be used for this purpose. Two most commonly used functions are listed below:

Function 1
$thumbnail = get_post_meta($post->ID, 'thumb', $single = true);

Function 2
$image = get_post_custom_values('img');

Displaying Content on Front Page Only

If there is some specific content that you are willing to show only on the front page of your blog, then you can use the following code snippet to do so:

Adding Content in Between Posts

There are times when you want to add a post in between already published two posts. What will you do in that situation? Well, here is a tweak from PHP that can help you handle things and do as you desire even in this tricky situation. Here is the PHP loop that you will need to edit for the purpose. You will find this loop in your index.php file:

Not Found Now, that you have found this code file, here is how you can add content in between posts:
Not Found

Knowing the Subscriber Count for FeedBurner

Knowing the subscriber count of your FeedBurner account is now simple. Just add the following code snippet to your WordPress back-end and you are good to go. Just, remember to replace the FeedBurner-Id with your own Id.

//get cool feedburner count
//Initialize the Curl session
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $whaturl);
$data = curl_exec($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
//end get cool feedburner count
Adding Breadcrumbs to your WordPress Blogs:
You can add breadcrumbs to your site using various plugins that are available online. Moreover, you can also use the following code snippet:

Steve Graham is a Java expert who has industry expertise in Java web development and J2EE application development. He is currently supervising Enterprise Java development projects as a senior developer at Xicom Technologies ltd, an offshore software development company.

  • November 19, 2012
8 Best Free Stock Video Websites for Tiktok, Reels, and Shorts Top 5 PHP Frameworks: Fast and Secure