List of top wordpress plugins for developers (2024)
Here is the list of very useful plugins that helps the wordpress plugins & theme developers. This plugins helped our team to easily debug and test code which will reduce development time.
How to add and remove classes in Javascript (without jQuery)
Learn how to manipulate CSS classes in JavaScript. Discover methods like classList.add(), classList.remove(), and classList.toggle() for adding, removing, and toggling classes on HTML elements.
PHP: using php cURL to fetch remote REST json API
Learn how to use PHP cURL. PHP cURL is a great tool for interacting with web services and APIs, and it provides a lot of control over the requests and responses.
Wordpress: Using wp_remote_get() to fetch remote REST json API
Learn how to use wp_remote_get() a wordpress builtin api to fetch any REST apis. wp_remote_get() is useful if you want to integrate data from another web service into your WordPress site, or if you want to consume data from an external API for some other purpose. For explanation we will use github REST api and pull git commits and print them.
Hugo: Using getJSON to fetch remote REST API in hugo template
Hugo is very powerful static site builder, it can fetch any JSON rest API and build content out of it. In this example we will use getJSON hugo function to fetch the json data from Woocommerce site. You can develope this further and create a full fledged headless e-commerce website with hugo at the frontend wordpress and woocommerce as a backend.
Wordpress: How to send email using wp_email()
wp_mail() is a wrapper function available in wordpress core that can send emails using wordpress configuration. You can use wp_mail() to send emails from wordpress/woocommerce plugins and themes.
Wordpress: Schedule a hook to be triggered by at the specified interval.
Wordpress core offer hook Schedules functionality. We can shedule custom events using wp_schedule_event() and wp_next_scheduled() hooks which will be triggered by WordPress at the specified interval.
Hugo: frontmatter title block code snippet for Visual Studio Code
In VSCode, Code Snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements. Learn how to use code snippets to generate frontmatter title block for Hugo
PHP: How store css or js code in a variable using Heredoc
Learn how to use PHP Heredoc to create dynamic css/js code for your frontend
Wordpress: How to get the url of a navigation menu by name
If you know the name of a menu’s name, and want to get its url for menu then here is the code.