Programming
Tutorials
-

Create New HTML Elements With jQuery
With jQuery, it’s not so hard to create HTML elements. All that is needed is to use the dollar sign function $() to initialize the element. And from there, other options can be attached like adding a CSS class, attribute id, and text to name a few. Requirements: jQuery How to create a new div…
-

Make WP Custom Columns Sortable
Next good and useful thing to do after adding a new custom column to the Posts Manage Page of the WordPress Admin Page is to make it sortable. This is a continuation of the tutorial Add New Columns To WP Posts Manage Page, thus we will be updating the function where the hook manage_posts_columns is…
-

Add New Columns To WP Posts Manage Page
WordPress Post Manage Page is the page where posts are being managed. This page list all post that can be group into Published, Draft, and Pending. You can also edit a post, trash a post, and add a new post. Each post on the list contains basic information such as the Title, Author, Categories, and…
-

Get WP Post Meta Value Of A Given Meta Key
Get the post meta_value of a given meta_key in WordPress. You can also use this to get the value of a custom meta field of a post. Requirements: WordPress Syntax. get_post_meta( $post_id, $key, $single ); Where. $post_id ( int Required ) is the Post ID. $key ( string Optional ) is the meta_key to retrieve,…
-

Create Your Own WP Post Views Counter
Create your own post views counter in WordPress with no plugin needed. Use the post meta field to store count views of a particular post, and increment it for every page hit. Requirements: WordPress 6.2 Step 1. Create a new function inside functions.php, and use it as a callback function to the action wp_head hook.…
-

Read and Parse JSON files in PHP
Read and parse JSON files using the functions file_get_contents() and json_decode() in PHP. The function file_get_contents() will read the entire file into a string, while json_decode() will decode the JSON string. Requirements: PHP PHP JSON extension – added and enabled by default since PHP 5.2.0 How To Read and Parse JSON Files in PHP. The…