Get Current Child Page with get_children

There are many method to display current child page in WordPress, this function is usefull to do the same command. Just Paste this code in functions.php

Call the function within the template file:

more documentation about get_children.

PHP, snippet, Wordpress, Leave a comment

How to set posts redirect to a new domain

I’m moving out a blog to a new domain, and redirect all posts specifically to a new domain.

http://olddomain.com/category/postname

should go to

http://newdomain.com/category/postname

Apache Server

On Apache that allows .htaccess, you can add this line on top of the file:

Nginx Server

On Nginx, add this line on server block configuration file:

Reload or restart Nginx for the change to take effect.

 

Linux, snippet, Uncategorized, Wordpress, , , , , Leave a comment