Wordpress How To

How to include angularjs javascript in wordpress post

AngularJS is great framework for declaring dynamic views in HTML documents. To include AngularJS we just need to include the angularjs javascript file in the read more

Convert wordpress page to posts and vice versa

Sometimes we want to convert a wordpress page to post or vice versa. WordPress treats a post slightly differently. e.g. WordPress shows posts automatically in read more

Find all user created wordpress custom field keys

Sometime we need to find all user created custom field key names (or meta key) in wordpress. This may be needed to find all posts read more

How to automate wordpress sandbox setup on Linux

Maintaining a wordpress site can be pretty involving task specially when you have so many plugins with regular updates. Many time you have to experiment new plugins, read more

How to capture php code or included file output in a variable

Sometimes we want to reuse a php function or include a file and want to capture  the output (from echo, print, etc.) of that function/file read more

How to check the performance of a plugin using mysql query log

Installing too many plugins can hurt wordpress blog performance as plugins may lead to more queries. One quick way to check the impact of a read more

How to migrate wordpress from root to sub directory

Migrating wordpress from root to subdirectory is not a difficult task but should be done carefully. Here are the steps which can be followed. Terminology read more

How to upgrade wordpress manually

Recently I upgraded wordpress from version 3.5.1 to 4.3.1. There are couple of ways you can upgrade wordpress and easiest one is do it using read more

How to view wordpress current version

If you want view the version of currently installed wordpress for a site, here are few approaches. View version using dashboard glance section If you read more

Setup xdebug for remote wordpress debugging

Using xdebug is pretty useful for debugging and sometimes understanding existing code. In a typical setup where wordpress in installed remotely on EC2 or any read more

WordPress – disable theme and plugin editing

Allowing theme editing from web can be prone to spam. To disable theme and plugin editor, add the following to wp-config.php define( ‘DISALLOW_FILE_EDIT’, true ); read more

WordPress – get wpdb class method names

get wpdb class method names using get_class_methods Here is the outcome from above code:

WordPress multisite network vs normal installation

When it is required to have more than one wordpress installations it can get little tricky. There are multiple way to do that. Do multiple read more

display method names from php WP_Query object

Sometimes it is useful to display all methods name given a reference to object. This can be used to debug and understand wordpress or any read more

find if a wordpress page is leaf page

Sometime we want to consider pages which have children as browse pages and may treat them separately in plugins etc. For example we may not read more