PUM Shortcode Full Functionality with Custom Post Types
-
This is just to help anyone else who needs the same functionality I did.
Currently, the PUM shortcode button only shows “Popup Cookie” when you’re on a custom post type. There is a filter you can hook into to make PUM shortcode fully functional on custom post types:
pum_shortcode_post_types
.Here is a generic version of my implemmentation (put it in your theme’s functions file):
/* Add full Popup Maker shortcode functionality to ustom post types */ function theme_name_product_pum_shortcode($pum_post_types) { $pum_post_types[] = 'product'; // this is the WooCommerce Product post type /* If you want to add to multiple, just add more lines like the above, using the appropriate post type names. If you need to add to a lot of post types, you could make an array, and use array_merge. */ return $pum_post_types; } add_filter('pum_shortcode_post_types', theme_name_product_pum_shortcode');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PUM Shortcode Full Functionality with Custom Post Types’ is closed to new replies.