phpface

Untitled

Jun 18th, 2022 (edited)
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. /**
  2.  *
  3.  * Add custom post types to data source
  4.  *
  5.  * @param array $post_types
  6.  *
  7.  */
  8. add_filter( 'streamtube/core/widget/posts/post_types', function( $post_types ){
  9.  
  10.     // Define your own custom post type
  11.     $custom_post_type = array(
  12.         'photos'    => esc_html__( 'Photos', 'streamtube-child' )
  13.     );
  14.  
  15.     return array_merge( $post_types, $custom_post_type );
  16.  
  17. }, 10, 1 );
Add Comment
Please, Sign In to add comment