There are invalid PHP codes in your sample. Try to use valid PHP code like below.
$imageWidth = get_option('devotional_imageWidth','100%');
$content = "<h2>Devotionally Images</h2>";
$content .= '<div style="width:' . $imageWidth. ';">';
$content .= '<img src="' .$show_file. '" alt="Image Title Here">';
$content .= "devotional by Devotional.ly";
$content .= '</div>';
return $content;
Related Posts:
- Should I use spl_autoload_register() in my plugin?
- How can I save a multiple select array with the settings API for a plug-in options page?
- Include WP_Query in my own PHP file?
- Using register_activation_hook in classes
- Is there a way for a plugin to add an attribute to the tag of a theme?
- How to use update and delete query in wordpress
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- add_meta_boxes action with refresh on save
- Resize Image without cropping
- My shortcode is showing up twice
- Database “Migration” for Plugins?
- When is is_admin() available?
- Does wp-cron runs all tasks scheduled at same time together or one after other?
- Making Quote Plugin more efficient
- Hiding WordPress Plugin Source Code
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Will simple function names in a class structure conflict with other plugins?
- Instantiate class to be available to all plugin functions
- How to test nonce with AJAX – Plugin development
- wp_loaded hook block script enquequing
- WP nonce invalid
- Custom filter in admin edit custom post type responding with invalid post type?
- How can i upload images in an admin page?
- How to find error in my code when the error message is pointing to WP core file?
- How to access global variable $menu inside a class function
- Custom user login page by creating a plugin
- Singelton class does not work, multiple initialization on page reload
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to upload a file to a folder named after the user_id via plugin
- Reprinting tags with all attributes
- developing a wordpress plugin, have a few PHP Woocommerce related coding questions
- Whitelisting items from custom options page
- Add_menu_page not displaying the menu in class based plugin
- Update results, Before deleting the related category [closed]
- adjust section according to country?
- Adding function to Genesis genesis_header [closed]
- Custom plugin settings link doesn’t append current class to menu item when visited? Why?
- How to obtain the current website URL in my theme?
- How to hook code to show after the_content?
- Plugin Generate Unexpected output during activation
- Undefined method class::construct() when creating a plugin
- Using and saving custom dropdown boxes on user profiles
- Hook called before text widget save
- Problem with AJAX in wordpress plugin
- wpdb prepare insert table doesn’t work
- Can a plugin redirect product page based on IF condition?
- Save html content of a widget textarea
- Why does my settings form redirect to the homepage?
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- How to override a plugins script
- Woocommerce custom Plugin in wordpress [closed]
- custom plugin with upload files does not work
- What is the difference between Null vs Empty (Zero Length) string?
- send popup after wp_redirect()
- no_rest_route error on custom routes
- Create ACF Checkbox to get all ACF Values from Parent Page
- Post form – AJAX won’t upload featured image – Plugin development
- File is executed twice if plugin is activating
- product_type_options get saved value [closed]
- Plugin won’t output characters with diacritics properly
- Display a custom name when the user has no name settle in his account
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- get Woocommerce product format json for WP_Query
- Sum All the Post Meta of Published posts of Current Logged in user
- Update user meta when an external link in admin notice is clicked
- Is there an option to execute javascript file only on plugin activation
- How do I remove an action hook inside a class that is called by another class?
- The plugin generated 225 characters of unexpected output during activation
- Autoloading Classes in Plugins
- Ajax in a class instantiated via shortcode
- Parsing webhook from Shopify in WordPress
- Comparing Dates within plugin using PHP If statement
- Shortcode Works for Logged in Users but Not Working for Guest
- Submit to itself don’t work
- WordPress / PhpStorm / XDebug and plugin_dir_path issues
- Singleton plugin activation; create database
- Send data from plugin to external database
- See output of a sql query while plugin installation in wordpress
- Why this plugin is not working?
- Permission error on plugin save
- How to get WordPress Adminmenu items?
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- How keep woocommerce users separeted in multisite install and keep admins on network
- base64_encode conflict with convert_smilies in wordpress
- Properly process a custom WP REST API request (Authenticate, Authorize + Validate)?
- Import users and custom user meta from csv
- Implement OAuth2 in custom plugin
- Prevent users from display default wordpress login form
- login redirect based on user role not work as expected
- redirect user from login page if is logged
- How to lock users account until approvation
- Create custom table for wordpress custom registration flow
- Variable ++ in query loop
- Authenticate + Authorize WP REST API request before built-in WP JSON Schema Payload Validation?
- WordPress wp_set_object_terms does not assign product to custom taxonomy
- Cannot register a custom WP-CLI command
- Why does WordPress not make use of gettext directly?
- Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks
- How can I catch WordPress custom settings page slug has already changed?