Category «Wordpress tips and tricks»

WordPress plugin development

Why we need plugins on wordpress? The plugins are used to extend default WordPress functionality without touching any core files. Changing anything in the WordPress core files is a bad idea because you can break the site. In plus when WordPress is updated, any core modifications will be overwritten and lost. At this moment are …

Enable Debugging in WordPress

Before we start it is indicated to have the debug enabled. To be sure that debug mode is enabled wordpress, go to the wp-config file and add next lines For more information about enabling debug on wordpress, check out the developer docs at wordpress

Random post order with correct pagination

You can find many resources on the internet to randomize the wordpress posts, simply add ‘orderby’ => ‘rand’ in wp query : The issue with this method is that it breaks wordpress pagination. If you navigate to the second page of the results, the random posts which are returned may contain posts that you have …

How to nofollow all external links in wordpress

By default, WordPress does not let you to automatically add nofollow to external links. You will have to manually add it or use a plugin to do this in an easier way. Tested plugin Nofollow for external link Use this plugin https://wordpress.org/plugins/nofollow-for-external-link/, and rel=nofollow and target=_blank will be automatically inserted, for all external links of …

Posting source code on your posts

WordPress does not allow you to use potentially dangerous code on your blog, there is a way to post source code for viewing. You can easily post syntax-highlighted code on your blog. 1. Install https://wordpress.org/plugins/syntaxhighlighter/ plugin 2. In your wodpress text editor just wrap your code in these tags: [  code lang=”js”] your code here …