This topic has 2 replies, 2 voices, and was last updated 9 years by Abe.

  • Author
  • #33135
     ahd904
    Participant

    Dear 7thQ Support,

    Hi, i have this short code that i can apply from a plugin.

    <li>[gmw form="id"]'</li>

    Is there any way that i can hack the menu and add an additional menu item in KLEO theme ??

    Or do you provide any hook which allows dynamically to add elements to it ?

    Regards,
    SB

    #33140
     ahd904
    Participant

    Also, additionally, i would like to ask if i can use the function below with a hook provided by a KLEO theme. This function is from using a plugin that allows to add address fields to buddypress groups.

    COPY CODE
    function gmw_get_group_location() {
    	global $groups_template, $wpdb;
    
    	$group_address = $wpdb->get_col( $wpdb->prepare( "
    		SELECT formatted_address FROM {$wpdb->prefix}gmw_groups_locator
    		WHERE id = %d", $groups_template->group->ID 
    	) );
    	
    	return $group_address[0];
    }
    
    function gmw_add_group_locaiton_to_the_loop() {
        echo gmw_get_group_location();
    }
    add_function( 'bp_directory_groups_item', 'gmw_add_group_locaiton_to_the_loop' );

    The function above allows to show the groups’ address in Buddypress loop.

    Would adding a below to the groups-loop.php in buddypress folder work or does KLEO theme have its own way of hooking ?
    echo gmw_get_group_location();

    Thank you in advance for the help.

    #33594
     Abe
    Keymaster

    Hi, we use normal buddypress hooks, probably the code is wrong. Try bp_after_directory_groups_list instead of bp_directory_groups_item

    As for the menu to accept shortcodes in the title, try replacing the content of functions.php from the theme with the content attached.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?