Hi there,
i´m trying to assign a sidebar to my custom post type “depoimentos”
i changed the functions.php:
"
function add_sidebar_custom_post() {
if( get_post_type() == ‘depoimentos’) {
return ‘ups-sidebar-depoimentos-sidebar’;
}
}
add_filter( ‘ups_sidebar’, ‘add_sidebar_custom_post’ );
"
and the wp-single-depoimentos.php:
"
<?php // ============================================================================= // VIEWS/RENEW/WP-SINGLE-depoimentos.PHP // ----------------------------------------------------------------------------- // Single post output for Renew. // ============================================================================= $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true ); ?> <?php get_header(); ?> <?php global $post; ?>…
<?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( 'renew', 'content-depoimentos', get_post_format() ); ?>
<?php the_field('depoimento'); ?>
<?php x_get_view( 'global', '_comments-template' ); ?>
<?php endwhile; ?>
</div>
<?php if ( $fullwidth != 'on' ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
"
What is missing?