Skip to content

Instantly share code, notes, and snippets.

@krugazul
Last active October 3, 2018 06:04
Show Gist options
  • Save krugazul/5eeb9482160a43f7afdb to your computer and use it in GitHub Desktop.
Save krugazul/5eeb9482160a43f7afdb to your computer and use it in GitHub Desktop.
LSX - Enable banner support on custom post types.
<?php
/**
* Enabled banners for the additional post types
*
* @package theme
* @subpackage setup
* @category banners
*
* @param $post_types array()
* @return $post_types array()
*/
function theme_allowed_post_type_banners($post_types) {
$post_types[] = 'room';
$post_types[] = 'activity';
$post_types[] = 'restaurant';
return $post_types;
}
add_action( 'lsx_banner_allowed_post_types', 'theme_allowed_post_type_banners' );
?>
@krugazul
Copy link
Author

krugazul commented Aug 3, 2015

Copy and paste this into your child themes functions.php

@krugazul
Copy link
Author

krugazul commented Oct 3, 2018

Update the action to 'lsx_banner_allowed_post_types'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment