Featured Image as Previous Next Post Navigation in WordPress

Just add this code to single.php, replace or comment the default function like the_post_navigation, get_previous_post, get_next_post, etc.


PHP, snippet, Wordpress, , Leave a comment

Add Custom Size Image to Media Popup in WordPress

In WordPres 4.5, my old function to add a custom size to media uploader seems not working anymore. But I found that new way to add custom size image is a lot simpler usingĀ image_size_names_choose filter.

Basically when you create your own image sizes using the add_image_size function:

you can just add the new sizes to image_size_names_choose:

Screen Shot 2016-06-06 at 4.36.51 PM

PHP, snippet, Wordpress, , Leave a comment

Make Your Server To Update WordPress Seamlessly

If you have issue doing “one click” WordPress upgrade on your server. This might be usefull for you:

First of all, include your username to “www-data” group.

then, change group ownership of your www files to www-data

add capability to group to have write access

find and change directory permission to 775 (owner and group writeble)

give read and write access to user and group on files

Last step, open up your wp-config.php and add this following code at the top of the file.

Lets try to upgrade your WordPress update or plugins. Cheers.

How To, Linux, Wordpress, , Leave a comment