add_shortcode('myCustomShortcode', 'this_particular_function');
As soon as I looked at my code this morning I realized I was trying to pass the function name ([this_particular_function]
) as the shortcode, not the shortcode name ([myCustomShortcode]
).
I overlooked this SO many times yesterday trying to look for some complex answer! I am smacking my head on the desk. Everything works great now, my bad.
The answer: Ockham’s razor.
Related Posts:
- Retrieve multiple values passed to a single attribute in a shortcode
- Display a text message if the shortcode is not found?
- Loading page template into shortcode
- My shortcode is showing up twice
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- Making Quote Plugin more efficient
- custom shortcode will not display the wrapped content
- Append HTML Using Shortcode
- Plugin CSS not enqueing
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- WordPress shortcode returns the data before
- Action Hook Inside WordPress Plugin Shortcode
- What is the difference between Null vs Empty (Zero Length) string?
- How to Create custom block for displaying information in content section which act like shortcode
- Display a custom name when the user has no name settle in his account
- overwrite wordpress gallery with custom gallery shortcode
- How to return html as a string from php for WordPress
- Shortcode Works for Logged in Users but Not Working for Guest
- using a shortcode in a hyperlink
- WP Custom tables query
- 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?
- Using register_activation_hook in classes
- Is there a way for a plugin to add an attribute to the tag of a theme?
- Shortcode to insert
- Shortcode putting html such as
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- Using Echo in ShortCode – Stuck
- Multiple do_shortcode($content) within one shortcode
- Database “Migration” for Plugins?
- WordPress menu deletes when trying to add a hook
- How to find the output of contact form 7 shortcode? [closed]
- How do i get (unique) page name?
- Does wp-cron runs all tasks scheduled at same time together or one after other?
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Browser title script ignoring is_page /else conditional [closed]
- How to limit the content coming from wordpress shortcodes?
- 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
- Create shortcodes within foreach loop (using array)
- WP nonce invalid
- How can i upload images in an admin page?
- How to display data from custom table in wordpress phpmyadmin
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Reprinting tags with all attributes
- Update results, Before deleting the related category [closed]
- Creating own shortcode – echoeing php variable based on JS variable
- Adding function to Genesis genesis_header [closed]
- How create a Shortcode with hover and complex options
- how to update and display an option without reloading the page
- Only first shortcode gets executed
- echo something inside a shortcode
- Plugin Generate Unexpected output during activation
- Undefined method class::construct() when creating a plugin
- anyway to put inside a $outprint=sprintf()
- Hook called before text widget save
- wpdb prepare insert table doesn’t work
- Line breaks inside shortcode variable
- Shortcode for Listing Users from Meta Value?
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- Shortcode to log user into current URL
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- Calling PHP Titles inside Javascript Markup
- custom plugin with upload files does not work
- Including Custom fields within the_content
- send popup after wp_redirect()
- no_rest_route error on custom routes
- Show Featured Image Dimensions and size frontend with shortcode
- How to work Woocommerce pagination inside shortcode?
- Create ACF Checkbox to get all ACF Values from Parent Page
- Display Visual Composer shortcode if a post belongs in specific categories
- is it possible for a URL to filter by tag
- Trying to create a shortcode to display categories with a specific product tag
- How to pass parameters in wordpress shortcode?
- product_type_options get saved value [closed]
- How can I prevent a shortcode div from extending beyond its boundaries?
- Hide content for specific users with id
- Adding variable in WordPress shortcode
- Execute Shortcode in Textfile
- custom taxonomies not working
- Sum All the Post Meta of Published posts of Current Logged in user
- How to output values from a loop into a javascript array
- Autoloading Classes in Plugins
- Comparing Dates within plugin using PHP If statement
- Short code into PHP
- Singleton plugin activation; create database
- Shortcode At top of Page – PHP 5.5 vs 5.4 – ob_start();
- Using the same shortcode to show any table from the database
- How to get WordPress Adminmenu items?
- Shortcoding with Divs
- How keep woocommerce users separeted in multisite install and keep admins on network
- Is there a better way to output HTML as a shortcode?
- Import users and custom user meta from csv
- Gutenberg – render_callback does not pass ToggleControl value on frontend
- Prevent users from display default wordpress login form
- Create custom table for wordpress custom registration flow
- Authenticate + Authorize WP REST API request before built-in WP JSON Schema Payload Validation?
- WordPress REST API – Custom field not added to pages