Forum Replies Created
-
Author
-
HHMediaDesignParticipant
Again, I feel like I am CLOSE but just don’t have quite enough php experience… This is the bit I altered from the primary Sweetdate functions.php to change the wording of “Quick Navigation” to “View More Members”. And I want to add it to the child functions… but I keep getting errors. Do you mind just showing me what bit I would need to put in the child theme to help me understand how the child functions file is working – I have obviously left in too much additional php code. It might help me edit more in future! Thank you…
COPY CODE<?php do_action( 'bp_after_profile_loop_content' ); ?> function bp_add_profile_navigation() { if(bp_is_user()): ?> <div class="three columns"> <ul class="inline-list right"> <li><?php _e("View more members", 'kleo_framework');?> </li> <?php $prev = bp_prev_profile(bp_displayed_user_id()); if ($prev !== "#") : ?><li><a>" title="<?php _e("Previous profile",'kleo_framework');?>"><i class="icon-chevron-left"></i></a></li><?php endif; ?> <?php $next = bp_next_profile(bp_displayed_user_id()); if ($next !== "#") : ?><li><a>" title="<?php _e("Next profile", 'kleo_framework');?>"><i class="icon-chevron-right"></i></a></li><?php endif; ?> </ul> </div> <?php endif;
HHMediaDesignParticipantBut I need to keep the end ?> correct? Ok, I got the BASE name change in there (thank you so much!) but can’t work out the others – when I add the changes I get the parse error again. SHould I open a new subject? Or can you advise…
For instance, I want to change the quick navigation wording using this… what would I need to put into the functions.php file instead because this isn’t working:
COPY CODEfunction bp_add_profile_navigation() { if(bp_is_user()): ?> <div class="three columns"> <ul class="inline-list right"> <li><?php _e("View more members", 'kleo_framework');?> </li> <?php $prev = bp_prev_profile(bp_displayed_user_id()); if ($prev !== "#") : ?><li><a>" title="<?php _e("Previous profile",'kleo_framework');?>"><i class="icon-chevron-left"></i></a></li><?php endif; ?> <?php $next = bp_next_profile(bp_displayed_user_id()); if ($next !== "#") : ?><li><a>" title="<?php _e("Next profile", 'kleo_framework');?>"><i class="icon-chevron-right"></i></a></li><?php endif; ?> </ul> </div> <?php endif;
HHMediaDesignParticipantFeeling rather stupid here but would you mind posting a sample child functions.php? Every time I try to edit the site shows a parse error… I am obviously putting the code in the wrong part of the file. This is what I’ve got – this is just showing previous changes I am trying to make, not the BASE title change yet:
COPY CODE<?php /** * @package WordPress * @subpackage Sweetdate * @author SeventhQueen <themesupport@seventhqueen.com> * @since Sweetdate 1.0 */ /** * Sweetdate Child Theme Functions * Add extra code or replace existing functions */ <?php do_action( 'bp_before_profile_loop_content' ); ?> <?php if ( bp_has_profile() ) : ?> <ul class="accordion"> <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php if ( bp_profile_group_has_fields() ) : ?> <?php do_action( 'bp_before_profile_field_content' ); ?> <li> <h5 class="accordion-title <?php bp_the_profile_group_slug(); ?>"><?php bp_the_profile_group_name(); ?><span class="accordion-icon"></span></h5> <div class="accordion-content"> <dl class="dl-horizontal"> <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <?php if ( bp_field_has_data() ) : ?> <dt><?php bp_the_profile_field_name(); ?></dt><br /> <dd><?php bp_the_profile_field_value(); ?></dd> <?php endif; ?> <?php do_action( 'bp_profile_field_item' ); ?> <?php endwhile; ?> </dl> </div> </li> <?php do_action( 'bp_after_profile_field_content' ); ?> <?php endif; ?> <?php endwhile; ?> </ul> <?php do_action( 'bp_profile_field_buttons' ); ?> <?php endif; ?> <?php do_action( 'bp_after_profile_loop_content' ); ?> function bp_add_profile_navigation() { if(bp_is_user()): ?> <div class="three columns"> <ul class="inline-list right"> <li><?php _e("View more members", 'kleo_framework');?> </li> <?php $prev = bp_prev_profile(bp_displayed_user_id()); if ($prev !== "#") : ?><li><a>" title="<?php _e("Previous profile",'kleo_framework');?>"><i class="icon-chevron-left"></i></a></li><?php endif; ?> <?php $next = bp_next_profile(bp_displayed_user_id()); if ($next !== "#") : ?><li><a>" title="<?php _e("Next profile", 'kleo_framework');?>"><i class="icon-chevron-right"></i></a></li><?php endif; ?> </ul> </div> <?php endif; } ?>
-
AuthorPosts