BuddyDev

Search

[Resolved] Buddyblog Pro – Elementor Loop Item Shortcode as Post Template on User Profile

  • Participant
    Level: Initiated
    Posts: 20
    VITOR MATOS on #47578

    Hey Branesh, thanks for your attention at all questions.

    i am trying to create my own template for display post and cpt on user profile…
    I know that i can display a post standalone page from a shortcode template, but how i can display in the post/cpt (my current cpt is “video”) layout a loop item from elementor? i tried with the shortcode on posts.php (theme-child/buddyblog/buddyboss/video) but only loop post post type and dont the video cpt…

    my loop item screenshot: https://prnt.sc/34sYiAsrY70V
    what i miss?

  • Keymaster
    (BuddyDev Team)
    Posts: 22498
    Brajesh Singh on #47580

    Hi Vitor,
    Thank you for the question.
    I have limited experience with elementor. So, I may not be able to assit much.

    Do you know a way you can achieve the same for a standard post type? If yes, you need to apply the same for BuddyBlog post types.

    The entry(single/loop) comes from a slightly modieifd buddyboss entry file.
    You can copy it from buddyblog/buddyboss/default/entry-content.php to your child theme/buddyblog/buddyboss/default/entry-content.php

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 20
    VITOR MATOS on #47611

    Hello Brajesh,
    Thank you for you attention.
    I dont have too much experience with php,

    The Entry loop that you mention worked with elementor! but i need a advice on hiding this “entry-content-wrap” section without remove the edit and delete button for the author of post…

    My current entry-content.php:

    
    <?php
    /**
     * Template part for displaying posts
     *
     * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
     *
     * @package BuddyBoss_Theme
     */
    ?>
    
    <?php 
    global $post;
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    	<?php if ( !is_single() || is_related_posts() ) { ?>
    		<div class="post-inner-wrap">
    	<?php } ?>
    <?php echo do_shortcode( '[elementor-template id="931"]' ); ?>
    
    	
    
    	<div class="entry-content-wrap">
    		
    	
    		
    		<?php if ( is_singular() && ! is_related_posts() ) { ?>
    			<div class="entry-content">
    			
    			</div><!-- .entry-content -->
    		<?php } ?>
            <div class="post-actions">
    			<?php echo bblpro_get_post_edit_link( get_the_ID() ); ?>
    			<?php echo bblpro_get_post_delete_link( get_the_ID() ); ?>
            </div>
    	</div>
    
    	<?php if ( !is_single() || is_related_posts() ) { ?>
    		</div><!--Close '.post-inner-wrap'-->
    	<?php } ?>
    
    </article><!-- #post-<?php the_ID(); ?> -->
    
    <?php if( is_single() && ( has_category() || has_tag() ) ) { ?>
    	<div class="post-meta-wrapper">
    		
    
    		
    	
            <div class="post-actions">
    			<?php echo bblpro_get_post_edit_link( get_the_ID() ); ?>
    			<?php echo bblpro_get_post_delete_link( get_the_ID() ); ?>
            </div>
    	</div>
    <?php } ?>
    
    

    Screenshot of the section in Private Browser (guest) that i want to remove for guest (not the author post for continue with the edit and delete button):
    https://prnt.sc/B669zLTJIbp-

    -Best Regards

  • Participant
    Level: Initiated
    Posts: 20
    VITOR MATOS on #47616

    Just to clarify, i dont know if this custom php are correct but its working for now, maybe Brajesh can fix my code….

    Just to add info about new elementor devs with buddyblog,

    I Fixed the issue with 1 step:

    1. giving the entry-content-wrap class 0padding in the css:

    ‘#item-body .bbl-posts-list .entry-content-wrap {
    padding: 0px 0px 0px;
    }’

    (that can be customized in your custom.css from theme our with the template overwriten like:
    theme-child\buddyblog\buddyboss\assets\css\default.css)

    https://prnt.sc/aYo3hcOJdAg3
    finally now the grid look pretty good and customizable ^^

    If Some dev can check the php code and correct me if the code can break something

  • Keymaster
    (BuddyDev Team)
    Posts: 22498
    Brajesh Singh on #47641

    Hi Vitor,
    Looks good.

    You may simplify it like this

    
    <?php
    /**
     * Template part for displaying posts
     *
     * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
     *
     * @package BuddyBoss_Theme
     */
    ?>
    
    <?php 
    global $post;
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        
    <?php echo do_shortcode( '[elementor-template id="931"]' ); ?>
        
    	<div class="entry-content-wrap">
            <div class="post-actions">
    			<?php echo bblpro_get_post_edit_link( get_the_ID() ); ?>
    			<?php echo bblpro_get_post_delete_link( get_the_ID() ); ?>
            </div>
    	</div>
    
    </article><!-- #post-<?php the_ID(); ?> -->
    

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved