You can change the name of add_gpp_gallery
function both in the callback and in the declaration to avoid the conflict between the original and your clone.
Something like this…
add_action('wp_head','jason_add_gpp_gallery');
function jason_add_gpp_gallery() {
if ( is_single() && 'your_post_type' == get_post_type() ) ){
remove_shortcode('gallery', 'gallery_shortcode');
add_shortcode('gallery', 'gpp_gallery_shortcode');
}
}
… should work for you.
Bonus: You can remove the original plugin action with remove_action() if needed.
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Create category for each user
- Calling an custom field from theme option at the frontend
- making a glossary with wordpress
- Remove base from the custom post type URL [duplicate]
- Disable plugin / plugin action via theme
- Redesigning Custom Post Type “Add New” page
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Need to create a Theme demo site that features multiple themes
- Why does including a file in theme’s functions.php not work?
- Getting Custom Post Type content from main-site of a Multisite
- Adding New Role
- Custom comment type maybe?
- Twillio How To Send SMS for Custom Post Type
- Add Top-Level Menu that opens URL
- Enable comments for post with comments meta box removed
- wordpress custom login successful redirect hook
- WordPress ajax call for not logged in users, doesn’t work
- Display All Non-Used Plugins
- New Plugin: Post update pushes a copy as a revision
- How to get images from EDD post?
- Placement of Code in Plugin for hooking `save_post`
- Add get_option to jquery
- Scope for PHP Variables Assigned in functions.php or a plugin
- Override the filter from plugin in child theme
- Add a plugin before main container
- Get all categories of custom post even not assigned
- Function to prevent users from trashing comments
- Allow users mark posts as “complete”?
- How does WordPress process plugin installations?
- Is there a way to order posts and custom post types as one group?
- How to create TEMPORARY Download links in a wordpress POST?
- Conditionally add apt. Open Graph meta data to different pages on WordPress site
- dynamically generating plugin syntax
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- Exclude post by custom meta with pre_get_posts
- wordpress plugin is not activating from widget
- get_post_type() and WP_QUERY issue
- How to use a class from another plugin
- Custom post type – no layout section of Document tab, and no author choice
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- How to remove custom post type and add category and post name
- Ajax : Call undefined function plugin_function() … can’t call any plugin function
- bbPress plugin: forum lists not showing in correct order? [closed]
- Is there a best practice remediation for PhpStorm’s warning that void function the_post_thumbnail is used?
- How to over-ride a file in a plugin? [closed]
- Overwrite category head title
- WordPress custom taxonomy not showing
- Using ACF default value to autoincrement a number field
- execute function after one completed
- How to reset the plugins without deactivate the plugin
- plugins_url() works everywhere but wp_reqister_script()
- Replacing global wp_query
- How to Resize the Custom Post Images?
- How to get specific string/value from an array? php [closed]
- posts from multiple post types in one slider
- WordPress Stock Update Programatically
- 5 PHP Fatal error: Uncaught ArgumentCountError (Cannot Find)
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- same user role or copy the user role to be same as the other role
- Use jQuery Datepicker code from plugin
- Execute a function when the entire page is displayed
- How can i listing current category and Featured Category post list?
- Posts 2 Posts: Display custom types connected to the same other custom type but with another connection
- How to add custom function to pluggable.php
- grab or load text on demand
- sliding/fading header plugin or approach suggestion
- Import Recent Posts Only and Ignore old ones if exist
- WordPress REST API: Query media files attached to a custom post type
- How would I get the new plugin version on this function?
- How to get the custom field value using SQL query
- How to display the category name in the tab and post inside the tab in WordPress?
- Want to build parent-child relationships between custom post types created with CPT UI
- Add an action based on custom post meta field
- Ultimate Members Default Post Layout problem
- Search in WordPress
- Modify function output in a plugin
- Is admin section completely customizable in terms of styling?
- How to make the first letter of a post title uppercase, in a plugin?
- Migrating custom php we wrote from functions.php into a site-specific plugin
- Code fails in plugin file but works in functions.php
- Conditional required fields for WordPress Contact Form 7
- Cannot access variables within a widget
- WordPress plugin options need to delete after deactivate & uninstall
- WordPress function to add text
- Doing action based on input from options menu
- Making a Custom Post Type Publish Loop
- WordPress User Frontend Editing Custom Fields
- Make a magic tag work with Custom Post Types
- Sync roles across several plugins
- How to Allow Users to Select Recipients In a WordPress Comment section?
- How often should I execute add_filter and function declaration in Code Snippets?
- Product customizing quiz – quiz adding products to the cart
- How to change all the urls of the WordPress site?
- Set the title of a custom post automatically by using info from custom fields?
- public custom posts not showing in my wordpress plugin
- plugin translation *.mo file not getting loaded for custom post
- Event Made Easy – Block registration to two or more events that have the same category
- I want to allow certain file types on dokan upload files