Posted by Prem Tiwari | Updated on | WordPress
In this tutorial, I have shared about how to use script and styles in WordPress. You can register your scripts and styles by using the wp_register_script() function. See the examples below: Use bellow function for …
Posted by Prem Tiwari | Updated on | in Docker Tutorial.
In this post, You will learn how to deploy create-react-app in Docker with docker-compose with NGINX as reverse-proxy. To dockerise the create-react-app please follow the steps below: 1. Create a Project folder 2. Install create-react-app …
Posted by Prem Tiwari | Updated on | WordPress
How to reorder meta box position in WordPress. In the following example, replace CPT with the post type name, like post, page, book, event, imaginary, foobar…
Posted by Prem Tiwari | Updated on | WordPress
Showing Meta Box via Jquery Checkbox. I found this solution to it though, pretty simple. See the below example:
Posted by Prem Tiwari | Updated on | WordPress
How to lock meta box position on post edit screen for contributors. Found this while trolling the internets… Works Perfectly
Posted by Prem Tiwari | Updated on | WordPress
How to disable sticky posts feature in WordPress. The best and most optimal solution is to simply “ignore” sticky posts on all queries which can be done with this code:
Posted by Prem Tiwari | Updated on | WordPress
How to disable the “remember me” to wp-admin in WordPress. You can do it with JavaScript (jQuery) or outputbuffering. A combination of both (outputbuffering and JS) are in the script below. PHP Code
Posted by Prem Tiwari | Updated on | WordPress
Use get_edit_post_link filter to change the title url on the edit post screen.
Posted by Prem Tiwari | Updated on | WordPress
Use the WP_Screen object to tell where you are at in the admin instead. Much more convenient. Note that you have to wait until at least the admin_head hook to run for the current screen …
Posted by Prem Tiwari | Updated on | WordPress
Wp_Schedule_Event every day at specific time WP Cron runs, when somebody visits your website. Thus if nobody visits, the cron never runs. Now there are 2 solutions: 1. Disable WP Cron, use a real cron …
Posted by Prem Tiwari | Updated on | in General.
In this post, you will learn how to connect git repo to Godaddy hosting server. This is for a Linux shared hosting account with GoDaddy. Install Git on your GoDaddy shared hosting server Server does …
Posted by Prem Tiwari | Updated on | PHP Interview
The final keyword in PHP is used to mark either a class or a function as final. If a class is marked as final, it cannot be extended to use its properties or methods. It …
Posted by Prem Tiwari | Updated on | in WordPress Core.
Google search console AMP validation error with latest update. I you got Disallowed attribute or attribute value present in HTML tag AMP errors in your Google search console after updated with the free Yoast SEO …
Posted by Prem Tiwari | Updated on | in WordPress.
This is how to remove the generator meta tag for the WordPress AMP Plugin. This refers to the WP AMP plugin by Automattic. Use the below example code in your theme’s functions.php file to remove …
Posted by Prem Tiwari | Updated on | WordPress
How to retrieve all post titles of a specific post type? Function that returns post titles from specific post type as form select element returns null if found no results.