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 Check if Meta Value Exist in WordPress Query

On a loop that performs data from custom meta field, to check if the meta key has value or exist, we can use the following query:

The above code can be used in WordPress older than 3.5 but it still usable in the latest version of WP, currently 5.1.

snippet, WordpressLeave a comment

Another Method to Make Your Link Bold Without Shifting Another Element

Related to my earlier post, here’s another method you can use in your next project ;).

CSS, snippetLeave a comment

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.

Easy!

PHP, snippet, Wordpress, , Leave a comment

Gravity Forms: Retain the Form After a Form Submitted

By default, if you use Gravity Forms, after you complete a form, a notification will be shown, and the form will be dismissed. Below is the script to retain the form after a form is submitted.

Just paste into functions.php and change the _id with the form ID.

I found this script somewhere, but I will credit the original source once I found it.

snippet, Wordpress, , Leave a comment