Join

Unlock the Listings Post Type

Don't want to mess with code snippets? This is a feature of MyListing Pro.

Instructions

  1. Create a new PHP code snippet.
  2. Copy the contents of code snippet below.
  3. Paste the contents into your code snippet.
  4. Review any notes that I’ve provided.
  5. Save and enable the code snippet.
  6. Test.

Snippet

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.

add_filter(
  "elementor_pro/utils/get_public_post_types",
  function ($post_types) {
    $post_types["job_listing"] = "Job Listing";
    return $post_types;
  },
  99
);

Video Tutorial

Youtube video