Unlock the Listings Post Type
Building better MyListing websites. One code snippet at a time.
Overview
The Unlock the Listings Post Type code snippet allows for greater flexibility within a MyListing website, by exposing this otherwise private post type.
One example is the ability to target Listings with Elementor Pro’s ‘Display Conditions’ feature.
Implementation
- Grab the code snippet.
- Follow the provided instructions.
- Save your changes.
//// INSTRUCTIONS:
//// Copy and paste the code snippet below into the child theme's functions.php file.
//// You can edit the functions.php file from your WordPress dashboard (Appearance > Theme Editor) or via FTP.
--------------------------- CODE SNIPPET IS BELOW THIS LINE ---------------------------
add_filter(
"elementor_pro/utils/get_public_post_types",
function ($post_types) {
$post_types["job_listing"] = "Job Listing";
return $post_types;
},
99
);
MyListing Theme Video Tutorial
Play Video