WordPress filter hook
wpml_element_type
Fired by 67 WordPress plugins, running on 11.1M+ sites between them.
How to use wpml_element_type
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wpml_element_type', function( $post_type ) {
// Change $post_type here.
return $post_type;
}, 10, 1 );Argument names come from Post Types Order's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
67 plugins that fire wpml_element_type
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
LiteSpeed Cache7+ million installs
apply_filters( 'wpml_element_type', get_post_type( $wpml_purge_id ) )thirdparty/woocommerce.cls.php:816 -
ElementsKit Elementor Addons1+ million installs
apply_filters( 'wpml_element_type', 'elementskit_content' )modules/dynamic-content/cpt-api.php:94 -
CookieYes1+ million installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )lite/includes/class-i18n-helpers.php:206 -
Post Types Order600,000+ installs
apply_filters( 'wpml_element_type', $post_type )include/class.cpto.php:596 -
SureRank SEO300,000+ installs
apply_filters( 'wpml_element_type', $term->taxonomy )inc/third-party-integrations/multilingual/providers/wpml.php:217 -
Jeg Kit for Elementor300,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )helper.php:1443 -
Photo Gallery, Sliders, Proofing and Themes300,000+ installs
apply_filters( 'wpml_element_type', 'displayed_gallery' )src/Display/I18N.php:256 -
WP All Export100,000+ installs
apply_filters( 'wpml_element_type', $post_type )libraries/XmlExportCpt.php:495 -
WPML Multilingual & Multicurrency for WooCommerce100,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $productId ) )compatibility/WcBookings/Slots.php:21 -
Asset CleanUp: Page Speed Booster100,000+ installs
apply_filters( 'wpml_element_type', $result['element_type'] )classes/Update.php:361 -
Product Import Export for WooCommerce80,000+ installs
apply_filters( 'wpml_element_type', 'post_product' )admin/modules/product/import/import.php:2154 -
Seraphinite Accelerator50,000+ installs
apply_filters( 'wpml_element_type', $type )Cmn/Gen.php:6584 -
Easy MCP AI40,000+ installs
apply_filters( 'wpml_element_type', $post->post_type )includes/cache/class-post-urls.php:122 -
FunnelKit30,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )compatibilities/class-wffn-wpml-plugin-compatibility.php:197 -
Custom Order Status Manager for WooCommerce30,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $order_id ) )src/Email.php:61 -
OG — Better Share on Social Media20,000+ installs
apply_filters( 'wpml_element_type', get_post_type( get_the_ID() ) )includes/iworks/opengraph/integrations/class-iworks-opengraph-integrations-sitepress-multilingual-cms.php:36 -
Email Template Designer20,000+ installs
apply_filters( 'wpml_element_type', 'wphtmlmail_mail' )includes/class-mailbuilder.php:609 -
All-in-One Video Gallery20,000+ installs
apply_filters( 'wpml_element_type', $post_type )public/wpml.php:270 -
Term Management Tools10,000+ installs
apply_filters( 'wpml_element_type', $new_taxonomy )classes/class-WPML.php:194 -
Nexter Extension10,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )include/panel-settings/extensions/content-seo/class-seo-sitemap.php:1771 -
BA Book Everything10,000+ installs
apply_filters( 'wpml_element_type', 'page' )includes/class-babe-install.php:392 -
Classified Listing8,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $main_listing_id ) )app/Helpers/Functions.php:5952 -
Clean Login5,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )include/shortcodes.php:353 -
FAZ Cookie Manager3,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )includes/class-i18n-helpers.php:998 -
Bulk Page Generator3,000+ installs
apply_filters( 'wpml_element_type', get_post_type($attachment_id) )src/multilingual/WpmlAdapter.php:168 -
WP Crowdfunding2,000+ installs
apply_filters( 'wpml_element_type', get_post_type( $campaign_id ) )includes/Functions.php:320 -
iGen SEO900+ installs
apply_filters( 'wpml_element_type', $post_type )includes/class-igen-seo-connector.php:2841 -
Seraphinite Post .DOCX Source800+ installs
apply_filters( 'wpml_element_type', $type )Cmn/Gen.php:6404 -
Directorist300+ installs
apply_filters( 'wpml_element_type', $raw_element_type )app/Helper/WPML_Helper.php:292 -
Dokan WPML300+ installs
apply_filters( 'wpml_element_type', get_post_type( $product->get_id() ) )dokan-wpml.php:1464 -
auto-post.io200+ installs
apply_filters( 'wpml_element_type', $post_type ? $post_type : 'post' )includes/api/multilingual.php:253 -
MCP Content Manager Lite100+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )includes/i18n/class-mcm-i18n-wpml.php:51 -
Emplibot100+ installs
apply_filters( 'wpml_element_type', $post_type )includes/rest-api.php:152 -
AI Chat App100+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )includes/class-ephd-multilang-utilities.php:142 -
Answer Engine Optimization100+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )src/Support/Lang.php:94 -
AutoMLP100+ installs
apply_filters( 'wpml_element_type', $post_type )includes/class-automlp-ai-helper.php:205 -
Pilo’Press90+ installs
apply_filters( 'wpml_element_type', $template_post_type )includes/classes/admin/patterns/class-patterns.php:276 -
ContentGecko Connector60+ installs
apply_filters( 'wpml_element_type', 'post_' . get_post_type( $original_post_id ) )includes/services/class-cg-post-service.php:446 -
GPSem.io40+ installs
apply_filters( 'wpml_element_type', get_post_type( $post_id ) )multilingual.php:195 -
Mediapapa40+ installs
apply_filters( 'wpml_element_type', 'attachment' )includes/ThirdParty/Wpml/WpmlIntegration.php:260 -
CloseHub Connector30+ installs
apply_filters( 'wpml_element_type', $post->post_type )includes/class-wpml.php:43 -
Seraphinite Bulk Discounts for WooCommerce20+ installs
apply_filters( 'wpml_element_type', $type )Cmn/Gen.php:5800 -
Livewords Flow10+ installs
apply_filters( 'wpml_element_type', get_post_type( $postId ) )includes/class-livewords-requestwrapper.php:657 -
Seraphinite Downloads Statistics10+ installs
apply_filters( 'wpml_element_type', $type )Cmn/Gen.php:6239 -
Seraphinite Alternative Slugs Manager10+ installs
apply_filters( 'wpml_element_type', $type )Cmn/Gen.php:5487 -
Ticketack10+ installs
apply_filters( 'wpml_element_type', static::POST_TYPE )app/helpers/sync_helper.class.php:323 -
multilingual search for WPML10+ installs
apply_filters( 'wpml_element_type', get_post_type($post->ID) )search.php:106 -
AiO Podcast Studio: All-in-One Podcast Manager, Player & Publisher10+ installs
apply_filters( 'wpml_element_type', 'page' )admin/admin.php:250 -
TopPosts for Google Analytics10+ installs
apply_filters( 'wpml_element_type', 'page' )inc/routes/filter-routes.php:469 -
SmartCloud AI-Kit10+ installs
apply_filters( 'wpml_element_type', $post->post_type )admin/kb/localization.php:115 -
TIM: Travel Information Manager10+ installs
apply_filters( 'wpml_element_type', $post_type )includes/class-tim-travel-information-manager-api.php:391 -
Odiseo SEO Bridge10+ installs
apply_filters( 'wpml_element_type', 'post' )multilingual.php:105 -
Multilingual Import10+ installs
apply_filters( 'wpml_element_type', $post_type )wp-multilingual-import.php:20 -
Madeep WP Connector10+ installs
apply_filters( 'wpml_element_type', 'post' )sources/Madeep-Admin.php:1989 -
Rankfluent AIFewer than 10 installs
apply_filters( 'wpml_element_type', $post->post_type )includes/class-wpml-service.php:125 -
MisterTranslateFewer than 10 installs
apply_filters( 'wpml_element_type', $post_type )includes/class-translation-controller.php:859 -
AI Chatbot for WordPressFewer than 10 installs
apply_filters( 'wpml_element_type', $type )includes/Compatibility/Wpml.php:99 -
Islamnashaat Translation ToolkitFewer than 10 installs
apply_filters( 'wpml_element_type', get_post_type($post_id) )islamnashaat-translation-toolkit.php:247 -
StalelingoFewer than 10 installs
apply_filters( 'wpml_element_type', $post_type )includes/Providers/WpmlProvider.php:278 -
JadeFewer than 10 installs
apply_filters( 'wpml_element_type', 'post' )jade-for-wordpress.php:442 -
RankPine: AI Writer & SEO on AutopilotFewer than 10 installs
apply_filters( 'wpml_element_type', 'post' )includes/class-rankpine-post-service.php:218 -
Blue Editoria : Content workflowFewer than 10 installs
apply_filters( 'wpml_element_type', 'post_' . $post->post_type )includes/class-multilingual.php:268 -
4WP DriveFewer than 10 installs
apply_filters( 'wpml_element_type', 'post_' . $post_type )src/Multilingual/Wpml_Provider.php:153 -
Softminal CacheFewer than 10 installs
apply_filters( 'wpml_element_type', $post->post_type )app/Multilingual/Multilingual.php:127 -
KlusioFewer than 10 installs
apply_filters( 'wpml_element_type', $type )klusio-builder-bridge.php:2919 -
SEO Mason BridgeFewer than 10 installs
apply_filters( 'wpml_element_type', 'post' )includes/class-seo-mason-bridge-publisher.php:515 -
lingAPI for Polylang & WPMLFewer than 10 installs
apply_filters( 'wpml_element_type', $post_type )includes/TurboTranslationsWPML.php:26
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.