Create a simple shortcode in WordPress

Use code snippet to create a simple WordPress shortcode. I have created a sample shortcode prefix-portfolio with 2 attributes. Before use change: #Before use change: Change the Prefix with your own unique prefix. Change the prefix with your own unique prefix. How to use? #How to use? Create a new page and add shortcode. Open the

Read More »

Debug WordPress hook sequence

Debug WordPress hook sequence How it works? Add query parameter debug in URL e.g. https://<mysite>/?debug. It’ll show the list of hooks in sequence. Code Snippet

Read More »

Register or Enqueue Google fonts in WordPress Theme

A valid way to register the Google fonts in the theme or plugin.

Read More »

Individual site upload limit notice

Show individual site upload limit notice on media page WordPress (Only for Multisite) Eg. Snippet

Read More »

Add post meta in post (custom post type) endpoint with Rest API

Add post meta in post (custom post type) endpoint with Rest API. Todo: #Todo: Change post-type with your post type slug. Change prefix-meta-key with your post meta key which you want to include in Rest API Response. Output: #Output: Visit https://<mysite>/wp-json/wp/v2/<post-type>/ it show the stored data from meta key  prefix-meta-key in the Rest API response. Code: #Code:  

Read More »
Scroll to Top
%d bloggers like this: