Best Ways to Secure WordPress
It’s a common issue that password hackers wander challenging the techno-minds and website owners who hack upon blogs and websites pilfering the secure information.
The damage caused is inimitable to fit the original stuff, hitting the popularity of the blog over their top rank in the search engines that earns more profit.
WordPress Website - Security
How to secure your WordPress Website from hackers and malwares has always been a big question under critical circumstances! So here go with some of the hacking tips and ways to control and prevent malicious attacks to keep up security factors.
- WP Security scans
- WP Security Lock
- Secure Files
- Version upgradation
- Password Safety
WP Security scans
Blogs can be set with freely available plug-in WP DB Backup, which restores or secures data back to the last settings. WP Security Scan free plug-in aids for blog safety.WordPress Firewall keeps a block over the suspicious entry into your WordPress.
WP Security Lock
The WP security service must fix and confer a solution to keep up the protection against hack software and damage caused to the website via hackers and malwares that destroys the website informations to risk ones business. Some of the WP security services that help in making the journey of business blogging successful are as follows

- WP Upgrade Services
- WP remove Malware & Restore website
- Website integrity Monitoring
- Website Security Monitoring
- WP Security Audit
- WP Security & Maintenance
- Existing Website WP Security
- WP Security Consultation
- WP Security Membership Program
- WP Security & Installation
Secure Files
Official and personal files in the Blog server can be kept hidden against illegal access by unauthorized users with an index.html file in the server directory that keeps the files hidden and secure from the public interference.
Version upgradation
Keeping updated with new version facilitates technology development that provides more advanced security settings and development in the field of blogging with security enhanced presentation.
Password Safety
Protect password from getting hacked as it affect your blogging at once, frequently changing of password at high strength of security is recommended for safety. Secure your Admin account and directory avoiding ‘Admin’ as username and password. Limit your
login account attempts on failure as Login Lockdown Plug-in records the failed login attempts from particular IP address and blocks them for a while. Remove login error message as it may give a clue on the login details.
In the recent news we have the WordPress team launching the WP Security Update 3.0.5 version that keeps safety over untrusted user account and hardens the security features against hackers at once.
Author is an innovative writer and expert in wrting articles on online marketing, ppc and ppc affiliates, seo,blogging tips etc.
How to Display Recent Posts in WordPress
WordPress have lots of potential as it has wide range of codes and plugins which can be used to extend its functionality.There are many guides and tutorials are also available.
Today we come up with a snippet of code which one can use to display recent posts in wordpress.
To display recent posts in wordpress just paste the code below where you want the recent posts to appear.
<?php query_posts('showposts=5'); ?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile;?>
</ul>
This will help you display recent posts in wordpress if you are looking for more guides related to wordperss then keep checking this blog frequently and you will find more cool tutorials and info related to wordpress.
How to Insert Ads within your Post Content in WordPress
If you have written huge number of posts and want to insert and ad within the post content then its not possible to edit all the posts and put the ad code individually in each post.
If you wan to insert ads within your post content in wordpress then follow the steps below.
Open single.php file located in your theme folder and look for the code that would look something like shown below:
<?php the_content(); ?>
Replace that code with the codes below:
<?php
$paragraphAfter= 1; //display after the first paragraph
$content = apply_filters('the_content', get_the_content());
$content = explode("</p>", $content);
for ($i = 0; $i <count($content); $i ) {
if ($i == $paragraphAfter) { ?>
<div>Your Text / Ads Go Here</div>
<?php }
echo $content[$i] . "</p>";
} ?>
You may change the number of paragraphs by changing $paragraph After line.
How to Create “send this to twitter” Button in WordPress
Twitter is one of the most popular social network basically its a microblogging platform where people love to share the stuff of their interest.If your posts is shared over twitter by some of your readers this may bring some new readers to your blog.
To make it easy to share your posts on twitter just create a button "send this to twitter" in your posts page.Follow the instructions below to create the button.
Simply paste the following code on your single.php file, within the loop:
<a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>" title="Click to send this page to Twitter!" target="_blank">Share on Twitter</a>
Now visitors can share your posts on twitter and this may bring some new readers to your blog.
How to List Scheduled Posts in WordPress
One can schedule posts in wordpress to be published on later dates or after some hours or days it may be anything depending on your need.If you are going for vacation you can schedule posts to be published when you are not available to update your blog.
You can show you visitors the scheduled posts in sidebar to do so just open sidebar.php and paste the following code:
<?php
$my_query = new WP_Query('post_status=future&order=DESC&showposts=5');
if ($my_query->have_posts()) {
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<li><?php the_title(); ?></li>
<?php endwhile;
}
?>
That's all you are done now this will show the scheduled posts in your sidebar.
How to Insert Adsense After First Post in WordPress
Have you ever wondered how to insert adsense after only first post in wordpress if so today we have come up with the solution for same.
Its highly asked question that how to insert adsense after first post in wordpres its very very simple.Just follow the instructions below and you are done.
Simply edit index.php file of your theme and look for the following code:
<?php endwhile; ?>
Immediately before this code, place the following code:
<?php if(!$show_ads){ ?>
Insert Code Here
<?php $show_ads = 1; } ?>
This works fine when its allowed to show only 3 Adsense ads on a page so you can show one after first post, one in sidebar and another one in header.
How to Separate Trackbacks from Comments in WordPress
By default wordpress does not shows trackbacks and comments separately but there is a hack which is used to show comments and trackbacks separately.
Its good to show comments and trackbacks separately as it makes the comments section clean and clutter free.If you want to seperate trackbacks from comments then follow the steps below.
Open and edit the comments.php file of your theme. Find the comment loop:
foreach ($comments as $comment) : ?>
// Comments are displayed here
endforeach;
Replace it with the following:
<ul>
<?php //Displays comments only
foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type == 'comment') { ?>
<li>//Comment code goes here</li>
<?php }
endforeach;
</ul>
<ul>
<?php //Displays trackbacks only
foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type != 'comment') { ?>
<li><?php comment_author_link() ?></li>
<?php }
endforeach;
</ul>
And you are done from now on the comments and trackbacks will be displayed separately.
How to Reverse Comments Order in WordPress
By default wordpess shows the comments in order of older first and the newer at last.Many bloggers want to reverse this order to show newer comments first and older comments at last.
If you also want to do the same its so easy just follow the steps below to reverse comments order in wordpress.
Just open the comments.php file located in your theme folder. Find the following line:
<?php foreach ($comments as $comment) : ?>
Now, add this line below:
<?php $comments = array_reverse($comments, true); ?>
The code should look like :
<?php $comments = array_reverse($comments, true); ?> <?php foreach ($comments as $comment) : ?> // comments loop <?php endforeach; ?>
That's all. Comments will now be displayed in reverse order.
How to Allow Contributors to Upload Files in WordPress
If you have a blog where people contribute posts then you may have noticed that contributors can't upload files in wordpress.Its the lack of their rights that wordpress does not allows contributors to upload files.
Its necessary that contributors can upload files so they can put image or video within the post and if you want to allow contributors to upload files in wordpress here is a quick hack.
Just paste the code below in functions.php file of your theme:
if ( current_user_can('contributor') && !current_user_can('upload_files') )
add_action('admin_init', 'allow_contributor_uploads');
function allow_contributor_uploads() {
$contributor = get_role('contributor');
$contributor->add_cap('upload_files');
}
You are done now contributors can upload files in wordpress.
How to Display Total Number of Comments in WordPress
To display total number of comments in wordpress you will need a short snippet of PHP code which we are sharing here.
To display total number of comments in wordperss all you will need to do is open your sidebar.php file or any other file where you want to display, and paste the following code:
<?php $commcount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); if (0 < $commcount) $commcount = number_format($commcount); echo "Our users have made ".$commcount." comments, care to join in?"; ?>You can style the code as per your desired need.