There are times when you stumble up on a feature in a blog, and you start thinking to yourself that how can I get this particular feature in my WP site. Many times you want it but do not know how to go about it. In this article we will jot down some WordPress tips and tricks which you may find useful.
See Also :- 10 Best Free HTML Editors for Web Developers
See Also :- 10 Best Frameworks for Web Developers
Ten essential tips for WP beginners:
Your sidebar is not your hall closet:
Your very well know that the hall closet which you are afraid to open just because of the stuff that was shoved on the top most shelf might come tumbling down on your head. That is precisely what WordPress sidebars look like. They are stuffed with social media icons, photos, links to tweets ads and much more. The link that you would like your visitor to click on is buried in this information. And if they cannot find it then there is no need to have it there and it serves no purpose.
2) Clean up your permalinks:
You toil to create some good content for your site so that you want Google, Yahoo and Bing to find it. So make it easy and simple for the search engines by using some road signs that point to your data and information. So how do you achieve it.
One of the quick and fast improvement is to use the Built-in WP permalink field at the of the page meant for editing, so as to revise your link before your get them published.
3) Maximize impact with targeted titles and descriptions:
When you share pages and posts on FB, LinkedIn and G+ these services pick up a page description and title to go along with the link that you have shared. And when your page appears (SERP) the title and description are the deciding factors for people whether or not to click on the link. That makes the description and title the most important text on your page.
4) Put your images to work for you:
The images add interest and beauty to your pages. They have a SEO job to do as well. Each time you upload an image to your site, you have the chance to add a keyword in your title of your image and alternate text fields. The title tag for your image generates the little text that is helpful when a person hovers over the image.
5) Focus attention and spark a response with a landing page:
Do you want your site visitors to take action? Focus their attention with a landing page and remove their distractions. Many premium themes have landing page theme built right in. it produces a page that has no navigation menu and a lot many white spaces to work in.
6) Do not forget the lowly footer:
At the bottom of your WP site is the mostly forgotten footer area. It is where you can include a copyright message, information about who owns the your site and a link to an important page. Many premium templates allow you to expand this area into a full fledged content section wherein you can also include a brief bio, links to pages and posts and many more.
7) How to use a custom page as a home page in WP:
Firstly you have to learn to create a custom page. You have to duplicate your page.php or create a brand new .php file and then add the below code at the top.
<?php /* Template Name: unlimitedstock */ ?>
In that page you can change the template name or change the styling. Go to your WP admin panel and create a new page and select this template.
after you publish this page go to settings -> reading in your admin panel.
And select your page to be the homepage. And here you have a custom home page.
8) How to create a page that displays random posts:
Some sites have this feature. They have a link in their top navigation to something like read random articles or some other text that is creative. When you click on that particular link, it redirects you to a page which displays one random page. Everytime you refresh you are shown some new posts. Then this trick is aptly for you. You have to follow the trick 1 in this article so as to create a custom page theme. And just paste the code in there:
query_posts(array(‘orderby’ => ‘rand’, ‘showposts’ => 1));
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<h1><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></h1>
<?php the_content(); ?>
This is a simple WP loop which runs a query so as to display random posts and the number one in there is telling WP to only show one post.
9) How to display any External RSS Feed on your site:
Did you observe other bloggers who display their blog’s feed on their site? You also want to do it for extra traffic and promotion. Here is a tutorial for you. Just paste the following code anywhere in your template.
$rss = fetch_feed(‘http://feeds.feedburner.com/unlimitedstock’);
$maxitems = $rss->get_item_quantity(5);
$rss_items = $rss->get_items(0, $maxitems);
<?php if ($maxitems == 0) echo ‘<li>No items.</li>’;
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
<a href='<?php echo $item->get_permalink(); ?>’
title='<?php echo ‘Posted ‘.$item->get_date(‘j F Y | g:i a’); ?>’>
<?php echo $item->get_title(); ?></a>
<?php endforeach; ?>
10) How to display relative dates in WP:
Did you ever observe this in comments and blog posts and ever wondered how did this blogger achieve this? It is pretty simple. You have to download a plugin called WP-Relative Date. After you have downloaded and activated the plugin, look into your single.php, index.php and page.php for this code snippet:
<?php the_date(); ?>
Replace it with:
<?php relative_post_the_date(); ?>