Skip to main content
PHP Raw
Updated over 2 years ago

With the PHP Raw widget, you can create everything you want.

There is no limit to what you can do, easily write the PHP code with an advanced code editor. You'll have access to all PHP functions, WP functions and data.


If you need to share values between different occurrences of the PHP Raw widget, you can use global variables. Global variables only work in frontend mode and not in edit mode.

Examples

You don't need to use opening and closing PHP tags in this widget. Simply write the snippet and see the magic.

Print an ACF Field

echo get_field( "field_key" );

Print the string length

You can use the String functions to manipulate the String values. For example, use strlen() to return the character length of the String.

Show a message if the user is logged-in


โ€‹

Did this answer your question?