php code in widgets | WordPress.org

Hi @wendihihihi,

Using WPCode you can create a new PHP snippet and use it as a shortcode.

From the WPCode library inside the plugin install & activate the snippet “Enable Shortcode Execution in Text Widgets” – you can now add the shortcode you created for your snippet in a regular text widget.

More info to help with the above can be found in these 2 articles:

https://wpcode.com/docs/how-to-create-your-first-snippet/

https://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer