Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created April 12, 2022 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save searchwpgists/4a53ebb09dc4ed33861d824ad6a286e6 to your computer and use it in GitHub Desktop.
Save searchwpgists/4a53ebb09dc4ed33861d824ad6a286e6 to your computer and use it in GitHub Desktop.
<?php
// @link https://searchwp.com/documentation/classes/searchwp-mod/
// Retrieve the Source name for a Post Type:
$source = \SearchWP\Utils::get_post_type_source_name( 'post' ); // Posts.
$source = \SearchWP\Utils::get_post_type_source_name( 'page' ); // Pages.
$source = \SearchWP\Utils::get_post_type_source_name( 'movie' ); // Custom Post Type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment