BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Featured Image upload makes disappear content on custom posts.
Tagged: content template, wp-types
- This topic has 25 replies, 3 contibutors, and was last updated 8 years, 4 months ago by Varun Dubey.
Question
December 4, 2015 at 2:13 pm #53716@tomastdCan I have a feedback about my last post on this topic, please?
Thank you.
Answers
December 9, 2015 at 3:50 am #54045@tomastdwhat does this “no answer” means?
December 9, 2015 at 4:21 am #54046@vapvarunHi @tomastd, Sorry for extremely delayed reply
just not got the time to cross test them to debug the issue.
I will do it today
Regards
Varun DubeyDecember 9, 2015 at 10:06 am #54080@tomastdOk, thank you.
December 10, 2015 at 8:54 am #54140@tomastdHi Varum, any news?
I had an update from wp-toolset support. It has been scaled to their developers team. Did they contact with you?
https://wp-types.com/forums/topic/content-templates-and-boss-theme-compatibility-reopened/
Thank you!!!
December 10, 2015 at 1:54 pm #54168@vapvarunHi @tomastd, I have played with wp-types today and not did not find any specific issue with it and we are also using the standard the_content function.
It may be possible any additional active plugin have filters for the the_content.
I have submitted plugin files to developers also to play with it once in parallel.I am not paid member of the WP-types to make a response on the thread, I have checked the thread and seems their findings are also the same as i had told from beginning.
RegardsDecember 10, 2015 at 4:15 pm #54180@tomastdHave you checked it with a featured image set?
First of all. Using your Buddyboss theme, with the same configuration, there is no problem. Neither with Twenty Fiften theme.
Let’s check if you can replicate what I am doing:
1. In wp-types you can show custom content using “Views–>Content Templates”.
2. When you set one of those to a custom type, it should render the_content() of the post with the selected fields.
3. It works fine if you don’t set a “featured Image” for that post, just in Boss theme.I have tested it wothoun any other plugin, and in different sites. And I have verified it many times. Every time I posted here.
I repeat, it works with any other theme but Boss. You can check the screen captures I wrote in the first post of this topic, more than one month ago.
Shane, the guy who was giving support from wp-types, gave us his mail in the thread. Here you have: [email protected]
I don’t know what else I can do. But I’m certain that the problem is in the Boss theme. Please, check it.
December 11, 2015 at 2:28 am #54204@vapvarunHi @tomastd, Clear to me now
I have modified single.php code little bit
Copy the following codes in single.php remove existing one and it will fix the issue<?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Boss * @since Boss 1.0.0 */ get_header(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php $is_photo = ''; $style = ''; if ( has_post_thumbnail() && boss_get_option( 'boss_cover_blog' ) ) { $id = get_post_thumbnail_id( $post->ID ); $style = 'style="background-image: url(' . wp_get_attachment_url( $id ) . ')"'; $is_photo = 'data-photo="yes"'; } ?> <header class="page-cover table" <?php echo $is_photo; ?> <?php echo $style; ?>> <div class="table-cell page-header"> <div class="cover-content"> <h1 class="post-title main-title"><?php the_title(); ?></h1> <div class="table"> <div class="table-cell entry-meta"> <?php buddyboss_entry_meta(); ?> </div> <div class="table-cell"> <!-- Socials --> <div class="btn-group social"> <?php foreach ( buddyboss_get_user_social_array() as $social => $name ): $url = buddyboss_get_user_social( get_the_author_meta( 'ID' ), $social ); ?> <?php if ( !empty( $url ) ): ?> <a class="btn" href="<?php echo $url; ?>" title="<?php echo esc_attr( $name ); ?>"><i class="alt-social-icon alt-<?php echo $social; ?>"></i> </a> <?php endif; ?> <?php endforeach; ?> </div> </div> </div> </div> </div> </header><!-- .archive-header --> <?php endwhile; wp_reset_postdata(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php if ( is_active_sidebar( 'sidebar' ) ) : echo '<div class="page-right-sidebar">'; else : echo '<div class="page-full-width">'; endif; ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php get_template_part( 'content', get_post_format() ); ?> <?php comments_template( '', true ); ?> </div><!-- #content --> </div><!-- #primary --> <?php endwhile; if ( is_active_sidebar( 'sidebar' ) ) : get_sidebar( 'sidebar' ); endif; ?> </div><!-- page-right-sidebar/page-full-width --> <?php get_footer();
Regards
December 11, 2015 at 2:30 am #54205@vapvarunI had separated the display for the header image with different loop and wp_reset_postdata to avoid any conflict to second loop
RegardsDecember 11, 2015 at 4:37 am #54210@tomastdWell, a big step fordward. Thank you very much. 😉
Please, can you advise developers to fix this in future releases. I suppose it will be a problem for any other plugin that uses the_content().
Thanks again!
December 11, 2015 at 7:21 am #54232@vapvarunHi @tomastd, I will close this for now
You can keep these edits in child theme
Regards
- The question ‘Featured Image upload makes disappear content on custom posts.’ is closed to new replies.