The short code is actually entered into then page or post content so disabling the short code processing prevents the gallery short code from being replaced with the gallery images but it doesn’t affect the post content.
The best solution is to add a new short code handler after removing the default gallery handles. Another less desirable approach would be to remove the short code tag from all posts and pages.
Short code replacement would look something like this:
function no_gallery($atts) {
return "";
}
add_shortcode('gallery', 'no_gallery');
Related Posts:
- How to get comments by post ID?
- Create pagination and order according to alphabet
- How to display Section for certain time
- Custom query_var causes displaying posts archive on front page
- Why does get_the_time(‘F j’) return November 30 for all posts?
- Query by one meta_key and sort by another (possibly NULL value)
- Very slow query
- Search Terms – Querying on either description__like OR name__like in the same Term Query?
- Query & Sort Comments by custom comment meta
- is_archive() doesn’t work on public query var archive pages?
- How to get category link without a database query
- search through post-type attachments titles
- How to count get_users query?
- Possible to get posts from multiple meta keys/values in a single query?
- Difference between fragment caching and wp_cache
- mysql query paging
- How to display all posts with today’s same month and day only?
- Select User by Joining Multiple Meta Value Results
- Show featured image as background image from postQuery
- How to set back query var author_name after unset it?
- Using $wpdb->update but confused on the WHERE in and SET
- You have an error in your SQL syntax – Help with query
- Make one query for adding entries to database
- WordPress Loop: List All Posts by a Category & Subcategory
- Order query by post meta value
- add_query_arg() and empty variables inside
- Query Strings and Woocommerce
- Style Post Differently In Query
- List all posts from past week grouped by sub-category
- Query Custom Post Type posts by Keyword/url slug
- WordPress post type “event” query string fix?
- how would I create a custom query to get all users, and a related post based on a postmeta field?
- Display posts with a start OR end date later than current date
- order one custom post type by modified time of another post type
- is_search called incorreclty
- Function to delete a post, it’s children and it’s grand children (half way there already)
- Query to Get All Users from wp_users With NO matching user_id In wp_usermeta
- Nested loop : wich way/order?
- WordPress custom setting page – add flashing message
- Dynamically adjust single-posttype.php query, based on current taxonomies
- Multiple Category Query
- Passing parameters to a static front page
- wp_list_pages() refuses to output posts
- Can’t seem to do combined query AND sort?
- Use mysql_query instead of $wpdb query
- sort query results by newest
- Post with certain term and without any term
- Custom Query – Based on user input
- Change the destination of the URLs in post.php
- Page with custom template make get request to a custom route – Pseudo code
- get_users with array as meta_value
- How to exclude posts for current user
- Ideas how to search & replace post_content when string contains a newline?
- Valid SQL query return empty
- mysql query – how to escape apostrophe?
- $wpdb->prepare affecting the query?
- WordPress SQL search, how to handle SQL Injection?
- exclude pingbacks from wordpress SQL query
- wp_posts query slowing down my website
- Updating with $qpdb->query() always returns 0 rows affected
- Get the_field of Advanced Custom Fields in a custom query [closed]
- Advanced Custom Fields – Relationship post foreach query
- How to manage a particular “order by” for get_search_query()?
- Query to view scheduled or draft post
- How do I query for posts by custom meta and those that have been stickied?
- Select min/max meta from query
- WordPress query unique post meta – finding all of one value without duplicates for a drop down
- How to add a Variable to post query
- Exclude in get_pages() based on meta field
- Sort a list of a CPT ( job) if a meta is empty
- SQL to Query the db and return all posts and it’s metas
- Query Post interferes with Pagination
- How to do a sql like query on serialized data of user meta data
- My archives page won’t sort posts by month
- Restore WordPress Backup Locally?
- Order WordPress Query by Custom Field While Still Using Tax_query Argument
- How to get all images in Media Gallery with pagination?
- Attachment page tag queries & posts not found
- “order” does not affect order of custom query
- Not getting input from get_query_var
- Performance of wp_get_attachment_image_srcset() and wp_get_attachment_image_url()
- YearMonth datequery
- Query Posts that have or don’t have a meta_value and order by the same ASC
- What is the best way to query posts based on live data?
- Why the pre_get_posts hook can cause apache stopped working?
- Query for distance OR taxonomy term
- How to query custom post type one after another
- How to display a specific category using a custom Query in WordPress?
- Apply ordering args to newly merged queried
- There is way to improve this query? wordpress get post data and some meta data
- Get blog id of subdirectory multisite blog from name – *outside* of wordpress request processing
- Cannot retrieve home url with custom queries
- Remove last comma from this query
- sql for querying post and their category
- WP_User_Query. Whats wrong with ‘relation’ => ‘OR’
- WordPress: paginating array using a foreach
- WordPress Unknown Query
- List of buyers for each product
- Where can I find the SQL to get the most used information by wordpress database?
- How to figure out correct wp_options to have autoload=’yes’