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]
- Display a text message if the field is not found and not if found
- Trying to count the total number of paragraphs inside a blog article
- greatest() function returns undefined property
- Limit the number of plugins that can be installed in a WordPress installation
- Debugging Technique Question re: functions.php
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- Add get_option to jquery
- Where to place custom functions?
- wordpress reusable content blocks
- Scope for PHP Variables Assigned in functions.php or a plugin
- Override the filter from plugin in child theme
- The Point of Using apply_filters()
- How to get post URL in the_content filter?
- GravityForm: Populate Dropdown with custom post type [closed]
- Add a plugin before main container
- WP Job Manager Category Drop-down; Change Placeholder Text Via Filter
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How to get variables from fucntion.php to my plugin files
- Get all categories of custom post even not assigned
- How to include code into functions.php file via a plugin
- Should i delete the posts created by a plugin on uninstall?
- Function to prevent users from trashing comments
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- Custom Taxonomy Tag Search
- May i Use ShortCode in Template?
- Allow users mark posts as “complete”?
- Missing argument 3 for wp_register_sidebar_widget()
- Redeclare theme’s function in a plugin
- How to add class in plugin only for network site?
- Pass info from functions.php to plugin
- How does WordPress process plugin installations?
- Is there a way to order posts and custom post types as one group?
- I have functions in my wordpress plugin. How do I get them to work for me?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- WooCommerce product search titles only
- RW Meta Box ,Problem setting post title
- How to create TEMPORARY Download links in a wordpress POST?
- How does WP handle multiple matching rewrite rules?
- Conditionally add apt. Open Graph meta data to different pages on WordPress site
- PHP Fatal error: Call to undefined function plugin_basename
- how do i remove posts from a WP_Query so the pagination is right?
- Saving Custom Post types and fields to a custom table
- dynamically generating plugin syntax
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Building a store locator with google maps
- plugin development: problem with functions
- add_query_arg not working
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- Shortcode button dosent work for all posts. Work for first post only
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Is there a way I can find wordpress posts that don’t contain a word?
- Accessing post’s meta data based on user’s click of a post
- Prevent shortcode from being wrapped in tags
- AJAX button run function
- Dropdown menu on custom page with product to choose number of products per page
- Change wordpress current_time function to different timezone
- Inserting HTML tag with ACF into shortcode
- custom post type not showing in menu
- Executing my function once on a specific time
- How to append to title via functions.php for auto-posting plugin [duplicate]
- How to stop or remove an action being called inside a function of an extended class
- Missing Argument
- load_plugin_textdomain error
- How to override a plugin function wrapped in a class?
- Bootstrap Drop Down menu is not working
- How to Display a Plugin function (content) on frontpage using index.php
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- Correct way to make meta box with more than one meta field secure
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- Plugin custom post type – Internal server Error
- Exclude post by custom meta with pre_get_posts
- How can I create a custom shortcode that will return a custom post type by ID?
- wordpress plugin is not activating from widget
- Theme my Login plugin, how to update fields
- Is it possible to create Custom Post plug-in?
- Edit Yoast SEO breadcrumbs output [closed]
- get_post_type() and WP_QUERY issue
- Adding Shortcode to Text Widget
- Date calculations from 2 custom fields
- get_post_type on post.php
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- List taxonomy terms for post as checkboxes
- All of my custom posttypes are 404’ing
- Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)
- Custom random quote widget breaks when used in multiple sidebars
- more types plugin – display all post of post type on page
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- Using a function to change favorites listing
- Display post lists in 2nd paragraph
- How to make a proper custom post type link
- How to debug error message: Cannot modify header information
- Using a post-signup hook to get user details
- How to enable specific plugin only based around shop manager role?