51

How to Expose and Use MyListing Job Listing Post Types with Elementor Pro

Powered by WPCodeBox

This MyListing code snippet exposes the otherwise private “job_listing” post type, enabling greater flexibility for your MyListing website. Use this snippet to target and display MyListing Job Listing post types with Elementor Pro’s powerful ‘Display Conditions’ feature, enhancing your site’s search engine optimization and user experience.


<?php 

/**
 * Author: MyListing Club
 * Author URI: https://mylisting.club
 */

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

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.