Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Fine Tuning › Child Themes › Child theme help
- This topic has 1 reply, 2 voices, and was last updated 6 years, 6 months ago by
Themosaurus.
-
AuthorPosts
-
lalaineParticipant@lalaine
- 11 Topics
- 22 Posts
How and where would I have to add this into my child theme as suggested by the developer of Buddy-press-simple events, currently the events page displays 1 event per row, not in columns and rows like the members or group directory, Thanks as always for your help.
“You can adjust the template layout however you like.
Open this file in a text editor:
buddypress-simple-events\templates\events-loop.php
Make a back-up copy first!To over-ride the template in your child theme, follow the directions at the top of the file.”
————————————————————
<?php
/**
* Template for displaying the Events Loop
* You can copy this file to your-theme
* and then edit the layout.
*/get_header();
$paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1;
$args = array(
‘post_type’ => ‘event’,
‘order’ => ‘ASC’,
‘orderby’ => ‘meta_value_num’,
‘meta_key’ => ‘event-unix’,
‘paged’ => $paged,
‘posts_per_page’ => 10,‘meta_query’ => array(
array(
‘key’ => ‘event-unix’,
‘value’ => current_time( ‘timestamp’ ),
‘compare’ => ‘>=’,
‘type’ => ‘NUMERIC’,
),
),);
$wp_query = new WP_Query( $args );
?><div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”>
<div id=”buddypress”><?php if ( $wp_query->have_posts() ) : ?>
<div class=”entry-content”><br/>
<?php echo pp_events_pagination( $wp_query ); ?>
</div><?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
<div class=”entry-content”>
<br/><h2 class=”entry-title”>
” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”>
<?php the_title(); ?>
</h2><?php
$author_id = get_the_author_meta(‘ID’);
$author_name = get_the_author_meta(‘display_name’);
?><?php the_excerpt(); ?>
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail( ‘thumbnail’ );
echo ‘<br/>’;
}
?><?php
$meta = get_post_meta($post->ID );if( ! empty( $meta[‘event-date’][0] ) )
echo __( ‘Date’, ‘bp-simple-events’ ) . ‘: ‘ . $meta[‘event-date’][0];if( ! empty( $meta[‘event-time’][0] ) )
echo ‘<br/>’ . __( ‘Time’, ‘bp-simple-events’ ) . ‘: ‘ . $meta[‘event-time’][0];if( ! empty( $meta[‘event-address’][0] ) )
echo ‘<br/>’ . __( ‘Location’, ‘bp-simple-events’ ) . ‘: ‘ . $meta[‘event-address’][0];if( ! empty( $meta[‘event-url’][0] ) )
echo ‘<br/>’ . __( ‘Url’, ‘bp-simple-events’ ) . ‘: ‘ . pp_event_convert_url( $meta[‘event-url’][0] );?>
<br/>
Category: <?php the_category(‘, ‘) ?></div><!– .entry-content –>
<?php endwhile; ?>
<div class=”entry-content”><br/>
<?php echo pp_events_pagination( $wp_query ); ?>
</div><?php else : ?>
<div class=”entry-content”><br/>There are no upcoming Events.</div>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div><!–buddypress–>
</div><!– #content –>
</div><!– #primary –><?php get_sidebar(); ?>
<?php get_footer(); ?>October 11, 2018 at 18:43 #2780@themosaurus- 1 Topics
- 1675 Posts
Hi @lalaine,
You can paste all the content of
buddypress-simple-events/templates
in your child theme, like following:gwangi-child/events-loop.php gwangi-child/single-event.php gwangi-child/members/single/profile-events-archive.php gwangi-child/members/single/profile-events-create.php gwangi-child/members/single/profile-events-loop.php
This plugin is currently not supported by your theme and you will need some extra custom work -mostly custom CSS and PHP code- to achieve a proper integration. For instance, if you wish to improve the display of the profile screens, it seems that change the markups from the templates found in
members/single
works fine.We hope this will help.
Regards,
October 12, 2018 at 19:22 #2824 -
AuthorPosts
The topic ‘Child theme help’ is closed to new replies.