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:

functions.php
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.

  1. LiteSpeed Cache icon LiteSpeed Cache7+ million installs apply_filters( 'wpml_element_type', get_post_type( $wpml_purge_id ) ) thirdparty/woocommerce.cls.php:816
  2. ElementsKit Elementor Addons icon ElementsKit Elementor Addons1+ million installs apply_filters( 'wpml_element_type', 'elementskit_content' ) modules/dynamic-content/cpt-api.php:94
  3. CookieYes icon CookieYes1+ million installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) lite/includes/class-i18n-helpers.php:206
  4. Post Types Order icon Post Types Order600,000+ installs apply_filters( 'wpml_element_type', $post_type ) include/class.cpto.php:596
  5. SureRank SEO icon SureRank SEO300,000+ installs apply_filters( 'wpml_element_type', $term->taxonomy ) inc/third-party-integrations/multilingual/providers/wpml.php:217
  6. Jeg Kit for Elementor icon Jeg Kit for Elementor300,000+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) helper.php:1443
  7. Photo Gallery, Sliders, Proofing and Themes icon Photo Gallery, Sliders, Proofing and Themes300,000+ installs apply_filters( 'wpml_element_type', 'displayed_gallery' ) src/Display/I18N.php:256
  8. WP All Export icon WP All Export100,000+ installs apply_filters( 'wpml_element_type', $post_type ) libraries/XmlExportCpt.php:495
  9. WPML Multilingual & Multicurrency for WooCommerce icon WPML Multilingual & Multicurrency for WooCommerce100,000+ installs apply_filters( 'wpml_element_type', get_post_type( $productId ) ) compatibility/WcBookings/Slots.php:21
  10. Asset CleanUp: Page Speed Booster icon Asset CleanUp: Page Speed Booster100,000+ installs apply_filters( 'wpml_element_type', $result['element_type'] ) classes/Update.php:361
  11. Product Import Export for WooCommerce icon Product Import Export for WooCommerce80,000+ installs apply_filters( 'wpml_element_type', 'post_product' ) admin/modules/product/import/import.php:2154
  12. Seraphinite Accelerator icon Seraphinite Accelerator50,000+ installs apply_filters( 'wpml_element_type', $type ) Cmn/Gen.php:6584
  13. Easy MCP AI icon Easy MCP AI40,000+ installs apply_filters( 'wpml_element_type', $post->post_type ) includes/cache/class-post-urls.php:122
  14. FunnelKit icon FunnelKit30,000+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) compatibilities/class-wffn-wpml-plugin-compatibility.php:197
  15. Custom Order Status Manager for WooCommerce icon Custom Order Status Manager for WooCommerce30,000+ installs apply_filters( 'wpml_element_type', get_post_type( $order_id ) ) src/Email.php:61
  16. OG — Better Share on Social Media icon 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
  17. Email Template Designer icon Email Template Designer20,000+ installs apply_filters( 'wpml_element_type', 'wphtmlmail_mail' ) includes/class-mailbuilder.php:609
  18. All-in-One Video Gallery icon All-in-One Video Gallery20,000+ installs apply_filters( 'wpml_element_type', $post_type ) public/wpml.php:270
  19. Term Management Tools icon Term Management Tools10,000+ installs apply_filters( 'wpml_element_type', $new_taxonomy ) classes/class-WPML.php:194
  20. Nexter Extension icon 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
  21. BA Book Everything icon BA Book Everything10,000+ installs apply_filters( 'wpml_element_type', 'page' ) includes/class-babe-install.php:392
  22. Classified Listing icon Classified Listing8,000+ installs apply_filters( 'wpml_element_type', get_post_type( $main_listing_id ) ) app/Helpers/Functions.php:5952
  23. Clean Login icon Clean Login5,000+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) include/shortcodes.php:353
  24. FAZ Cookie Manager icon FAZ Cookie Manager3,000+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) includes/class-i18n-helpers.php:998
  25. Bulk Page Generator icon Bulk Page Generator3,000+ installs apply_filters( 'wpml_element_type', get_post_type($attachment_id) ) src/multilingual/WpmlAdapter.php:168
  26. WP Crowdfunding icon WP Crowdfunding2,000+ installs apply_filters( 'wpml_element_type', get_post_type( $campaign_id ) ) includes/Functions.php:320
  27. iGen SEO icon iGen SEO900+ installs apply_filters( 'wpml_element_type', $post_type ) includes/class-igen-seo-connector.php:2841
  28. Seraphinite Post .DOCX Source icon Seraphinite Post .DOCX Source800+ installs apply_filters( 'wpml_element_type', $type ) Cmn/Gen.php:6404
  29. Directorist icon Directorist300+ installs apply_filters( 'wpml_element_type', $raw_element_type ) app/Helper/WPML_Helper.php:292
  30. Dokan WPML icon Dokan WPML300+ installs apply_filters( 'wpml_element_type', get_post_type( $product->get_id() ) ) dokan-wpml.php:1464
  31. auto-post.io icon auto-post.io200+ installs apply_filters( 'wpml_element_type', $post_type ? $post_type : 'post' ) includes/api/multilingual.php:253
  32. MCP Content Manager Lite icon MCP Content Manager Lite100+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) includes/i18n/class-mcm-i18n-wpml.php:51
  33. Emplibot icon Emplibot100+ installs apply_filters( 'wpml_element_type', $post_type ) includes/rest-api.php:152
  34. AI Chat App icon AI Chat App100+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) includes/class-ephd-multilang-utilities.php:142
  35. Answer Engine Optimization icon Answer Engine Optimization100+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) src/Support/Lang.php:94
  36. AutoMLP icon AutoMLP100+ installs apply_filters( 'wpml_element_type', $post_type ) includes/class-automlp-ai-helper.php:205
  37. Pilo’Press icon Pilo’Press90+ installs apply_filters( 'wpml_element_type', $template_post_type ) includes/classes/admin/patterns/class-patterns.php:276
  38. ContentGecko Connector icon ContentGecko Connector60+ installs apply_filters( 'wpml_element_type', 'post_' . get_post_type( $original_post_id ) ) includes/services/class-cg-post-service.php:446
  39. GPSem.io icon GPSem.io40+ installs apply_filters( 'wpml_element_type', get_post_type( $post_id ) ) multilingual.php:195
  40. Mediapapa icon Mediapapa40+ installs apply_filters( 'wpml_element_type', 'attachment' ) includes/ThirdParty/Wpml/WpmlIntegration.php:260
  41. CloseHub Connector icon CloseHub Connector30+ installs apply_filters( 'wpml_element_type', $post->post_type ) includes/class-wpml.php:43
  42. Seraphinite Bulk Discounts for WooCommerce icon Seraphinite Bulk Discounts for WooCommerce20+ installs apply_filters( 'wpml_element_type', $type ) Cmn/Gen.php:5800
  43. Livewords Flow icon Livewords Flow10+ installs apply_filters( 'wpml_element_type', get_post_type( $postId ) ) includes/class-livewords-requestwrapper.php:657
  44. Seraphinite Downloads Statistics icon Seraphinite Downloads Statistics10+ installs apply_filters( 'wpml_element_type', $type ) Cmn/Gen.php:6239
  45. Seraphinite Alternative Slugs Manager icon Seraphinite Alternative Slugs Manager10+ installs apply_filters( 'wpml_element_type', $type ) Cmn/Gen.php:5487
  46. Ticketack icon Ticketack10+ installs apply_filters( 'wpml_element_type', static::POST_TYPE ) app/helpers/sync_helper.class.php:323
  47. multilingual search for WPML icon multilingual search for WPML10+ installs apply_filters( 'wpml_element_type', get_post_type($post->ID) ) search.php:106
  48. AiO Podcast Studio: All-in-One Podcast Manager, Player & Publisher icon AiO Podcast Studio: All-in-One Podcast Manager, Player & Publisher10+ installs apply_filters( 'wpml_element_type', 'page' ) admin/admin.php:250
  49. TopPosts for Google Analytics icon TopPosts for Google Analytics10+ installs apply_filters( 'wpml_element_type', 'page' ) inc/routes/filter-routes.php:469
  50. SmartCloud AI-Kit icon SmartCloud AI-Kit10+ installs apply_filters( 'wpml_element_type', $post->post_type ) admin/kb/localization.php:115
  51. TIM: Travel Information Manager icon TIM: Travel Information Manager10+ installs apply_filters( 'wpml_element_type', $post_type ) includes/class-tim-travel-information-manager-api.php:391
  52. Odiseo SEO Bridge icon Odiseo SEO Bridge10+ installs apply_filters( 'wpml_element_type', 'post' ) multilingual.php:105
  53. Multilingual Import icon Multilingual Import10+ installs apply_filters( 'wpml_element_type', $post_type ) wp-multilingual-import.php:20
  54. Madeep WP Connector icon Madeep WP Connector10+ installs apply_filters( 'wpml_element_type', 'post' ) sources/Madeep-Admin.php:1989
  55. Rankfluent AI icon Rankfluent AIFewer than 10 installs apply_filters( 'wpml_element_type', $post->post_type ) includes/class-wpml-service.php:125
  56. MisterTranslate icon MisterTranslateFewer than 10 installs apply_filters( 'wpml_element_type', $post_type ) includes/class-translation-controller.php:859
  57. AI Chatbot for WordPress icon AI Chatbot for WordPressFewer than 10 installs apply_filters( 'wpml_element_type', $type ) includes/Compatibility/Wpml.php:99
  58. Islamnashaat Translation Toolkit icon Islamnashaat Translation ToolkitFewer than 10 installs apply_filters( 'wpml_element_type', get_post_type($post_id) ) islamnashaat-translation-toolkit.php:247
  59. Stalelingo icon StalelingoFewer than 10 installs apply_filters( 'wpml_element_type', $post_type ) includes/Providers/WpmlProvider.php:278
  60. Jade icon JadeFewer than 10 installs apply_filters( 'wpml_element_type', 'post' ) jade-for-wordpress.php:442
  61. RankPine: AI Writer & SEO on Autopilot icon RankPine: AI Writer & SEO on AutopilotFewer than 10 installs apply_filters( 'wpml_element_type', 'post' ) includes/class-rankpine-post-service.php:218
  62. Blue Editoria : Content workflow icon Blue Editoria : Content workflowFewer than 10 installs apply_filters( 'wpml_element_type', 'post_' . $post->post_type ) includes/class-multilingual.php:268
  63. 4WP Drive icon 4WP DriveFewer than 10 installs apply_filters( 'wpml_element_type', 'post_' . $post_type ) src/Multilingual/Wpml_Provider.php:153
  64. Softminal Cache icon Softminal CacheFewer than 10 installs apply_filters( 'wpml_element_type', $post->post_type ) app/Multilingual/Multilingual.php:127
  65. Klusio icon KlusioFewer than 10 installs apply_filters( 'wpml_element_type', $type ) klusio-builder-bridge.php:2919
  66. SEO Mason Bridge icon SEO Mason BridgeFewer than 10 installs apply_filters( 'wpml_element_type', 'post' ) includes/class-seo-mason-bridge-publisher.php:515
  67. lingAPI for Polylang & WPML icon 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.