Wordpress tricks

Home/Wordpress tricks

wordpress tricks, tips, code snippets, wordpress plugins, plugin development, useful functions in wordpress, template tags and customization, frontend uploader for wordpress posts

27 02, 2012

Get Users’ Search Terms

This code is very useful when you want to show the users posts related to their search. Some blog would show pop ups at the bottom using these search terms and will take users to other posts of their blog. Here is a code snippet to get the search terms of your users. $refer = $_SERVER["HTTP_REFERER"]; if (strpos($refer, "google")) { $refer_string = parse_url($refer, PHP_URL_QUERY); parse_str($refer_string, $vars); $search_terms = $vars['q']; echo 'Welcome Google visitor! You searched for the following terms to get here: '; echo $search_terms; }; ?>

17 02, 2012

Featured Image Link Missing

If you see that Featured Image link is not visible on the post edit page, that means your theme does not support thumbnails.You can add one line to your functions.php in the active theme folder. This can be done by the code below. add_theme_support( 'post-thumbnails' );    

17 02, 2012

5 Best WordPress Plugins to Improve Performance

WordPress has proven itself a popular and dependable Web publishing platform since its 2003 debut due to its ease of setup and use. The best thing about wordpress is its plug-ins. Once you are done with installing and setting up the basic blog, you can add plug-ins and enhance your website. But plug-ins can also cause your website to slow down,so keep the number of plug-ins as small as possible. If you can do anything without a plug-in, don't use a plug-in. Here i have listed few good plug-ins thatcan be very helpful for your blog. W3¬† Total Cache This plugin optimizes your blog and decreases the loading time of pages. It goes¬†from the basic page caching (keeping a static copy of the page), to CSS/JS/HTML minification (making your files smaller), as well as handling uploads to a Content Delivery Network. Download | Plugin Site   SEO Friendly Images Adding titles and Alt text to your images attracts google traffic for your blog. Download   Google XML Sitemaps Create a Google sitemaps compliant XML-Sitemap of your blog Download   WP-Optimize