Guest User

Untitled

a guest
May 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php // don't copy this line in your code
  2.  
  3. /**
  4. * Disable title on all post types.
  5. */
  6. function your_prefix_post_title() {
  7.  
  8. $post_types = array(
  9. 'post',
  10. 'page',
  11. 'testimonials' // Add your post type slug's.
  12. );
  13.  
  14. // bail early if the current post type if not the one we want to customize.
  15. if ( ! in_array( get_post_type(), $post_types ) ) {
  16. return;
  17. }
  18.  
  19. // Disable Post featured image.
  20. add_filter( 'astra_the_title_enabled', '__return_false' );
  21. }
  22.  
  23. add_action( 'wp', 'your_prefix_post_title' );
Add Comment
Please, Sign In to add comment