Tagged: x
-
AuthorPosts
-
August 12, 2016 at 6:46 pm #1129322
Hi X theme allows the option to add premade bbpress and buddypress navigation buttons, a person and a chat box, below those, Is it possible to add other pages to this menu? Or to edit these pages? By taking some away and putting new ones in its place?
August 13, 2016 at 1:50 am #1129682Hello There,
Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
Thank you.
August 13, 2016 at 6:27 am #1129836I have attached a screen shot of the navigation icons. When you click them it gives you an option to select more from a drop down menu. Is there anyway to edit this?
August 13, 2016 at 5:54 pm #1130206Hi there,
What editing do you wish to apply? These are the code responsible for that
function x_buddypress_navbar_menu( $items, $args ) { if ( X_BUDDYPRESS_IS_ACTIVE && x_get_option( 'x_buddypress_header_menu_enable' ) == '1' ) { if ( bp_is_active( 'activity' ) ) { $logged_out_link = bp_get_activity_directory_permalink(); } else if ( bp_is_active( 'groups' ) ) { $logged_out_link = bp_get_groups_directory_permalink(); } else { $logged_out_link = bp_get_members_directory_permalink(); } $top_level_link = ( is_user_logged_in() ) ? bp_loggedin_user_domain() : $logged_out_link; $submenu_items = ''; if ( bp_is_active( 'activity' ) ) { $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_get_activity_directory_permalink() . '" class="cf"><i class="x-icon-thumbs-up" data-x-icon="" aria-hidden="true"></i> <span>' . x_get_option( 'x_buddypress_activity_title' ) . '</span></a></li>'; } if ( bp_is_active( 'groups' ) ) { $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_get_groups_directory_permalink() . '" class="cf"><i class="x-icon-sitemap" data-x-icon="" aria-hidden="true"></i> <span>' . x_get_option( 'x_buddypress_groups_title' ) . '</span></a></li>'; } if ( is_multisite() && bp_is_active( 'blogs' ) ) { $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_get_blogs_directory_permalink() . '" class="cf"><i class="x-icon-file" data-x-icon="" aria-hidden="true"></i> <span>' . x_get_option( 'x_buddypress_blogs_title' ) . '</span></a></li>'; } $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_get_members_directory_permalink() . '" class="cf"><i class="x-icon-male" data-x-icon="" aria-hidden="true"></i> <span>' . x_get_option( 'x_buddypress_members_title' ) . '</span></a></li>'; if ( ! is_user_logged_in() ) { if ( bp_get_signup_allowed() ) { $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_get_signup_page() . '" class="cf"><i class="x-icon-pencil" data-x-icon="" aria-hidden="true"></i> <span>' . x_get_option( 'x_buddypress_register_title' ) . '</span></a></li>'; $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_get_activation_page() . '" class="cf"><i class="x-icon-key" data-x-icon="" aria-hidden="true"></i> <span>' . x_get_option( 'x_buddypress_activate_title' ) . '</span></a></li>'; } $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Log in', '__x__' ) . '</span></a></li>'; } else { $submenu_items .= '<li class="menu-item menu-item-buddypress-navigation"><a href="' . bp_loggedin_user_domain() . '" class="cf"><i class="x-icon-cog" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Profile', '__x__' ) . '</span></a></li>'; } if ( $args->theme_location == 'primary' ) { $items .= '<li class="menu-item current-menu-parent menu-item-has-children x-menu-item x-menu-item-buddypress">' . '<a href="' . $top_level_link . '" class="x-btn-navbar-buddypress">' . '<span><i class="x-icon-user" data-x-icon="" aria-hidden="true"></i><span class="x-hidden-desktop"> ' . __( 'Social', '__x__' ) . '</span></span>' . '</a>' . '<ul class="sub-menu">' . $submenu_items . '</ul>' . '</li>'; } } return $items; } add_filter( 'wp_nav_menu_items', 'x_buddypress_navbar_menu', 9997, 2 );
and
function x_bbpress_navbar_menu( $items, $args ) { if ( X_BBPRESS_IS_ACTIVE && x_get_option( 'x_bbpress_header_menu_enable' ) == '1' ) { $submenu_items = ''; $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_search_url() . '" class="cf"><i class="x-icon-search" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Forums Search', '__x__' ) . '</span></a></li>'; if ( is_user_logged_in() ) { $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_favorites_permalink( get_current_user_id() ) . '" class="cf"><i class="x-icon-star" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Favorites', '__x__' ) . '</span></a></li>'; $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_subscriptions_permalink( get_current_user_id() ) . '" class="cf"><i class="x-icon-bookmark" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Subscriptions', '__x__' ) . '</span></a></li>'; } if ( ! X_BUDDYPRESS_IS_ACTIVE || X_BUDDYPRESS_IS_ACTIVE && x_get_option( 'x_buddypress_header_menu_enable' ) == '' ) { if ( ! is_user_logged_in() ) { $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Log in', '__x__' ) . '</span></a></li>'; } else { $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_user_profile_url( get_current_user_id() ) . '" class="cf"><i class="x-icon-cog" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Profile', '__x__' ) . '</span></a></li>'; } } if ( $args->theme_location == 'primary' ) { $items .= '<li class="menu-item current-menu-parent menu-item-has-children x-menu-item x-menu-item-bbpress">' . '<a href="' . get_post_type_archive_link( bbp_get_forum_post_type() ) . '" class="x-btn-navbar-bbpress">' . '<span><i class="x-icon-comment" data-x-icon="" aria-hidden="true"></i><span class="x-hidden-desktop"> ' . __( 'Forums', '__x__' ) . '</span></span>' . '</a>' . '<ul class="sub-menu">' . $submenu_items . '</ul>' . '</li>'; } } return $items; } add_filter( 'wp_nav_menu_items', 'x_bbpress_navbar_menu', 9996, 2 );
You can add these to your child theme’s functions.php with the changes you wish to apply.
Thanks!
August 14, 2016 at 11:25 am #1130872Great thank you! I would mostly like to change the chat box to say forum, or to add a forum tab underneath it.
August 14, 2016 at 12:08 pm #1130898Hi there,
Thanks for updating. Please provide your URL so that we can provide you some tailored code for this.
Cheers!
August 14, 2016 at 12:38 pm #1130908Thank you so much! http://www.ayahuascachurches.org/
August 14, 2016 at 12:47 pm #1130912Hi there,
Thanks for writing back! It seems your website is under construction. Please take it off or provide us the credentials in private reply so that we can check and assist you on this.
Thanks
August 14, 2016 at 3:15 pm #1130986This reply has been marked as private.August 14, 2016 at 8:56 pm #1131274Hello There,
To add a forum text in the chat bubble, please insert this following code in your child theme’s functions.php file.
function x_bbpress_navbar_menu( $items, $args ) { if ( X_BBPRESS_IS_ACTIVE && x_get_option( 'x_bbpress_header_menu_enable' ) == '1' ) { $submenu_items = ''; $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_search_url() . '" class="cf"><i class="x-icon-search" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Forums Search', '__x__' ) . '</span></a></li>'; if ( is_user_logged_in() ) { $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_favorites_permalink( get_current_user_id() ) . '" class="cf"><i class="x-icon-star" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Favorites', '__x__' ) . '</span></a></li>'; $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_subscriptions_permalink( get_current_user_id() ) . '" class="cf"><i class="x-icon-bookmark" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Subscriptions', '__x__' ) . '</span></a></li>'; } if ( ! X_BUDDYPRESS_IS_ACTIVE || X_BUDDYPRESS_IS_ACTIVE && x_get_option( 'x_buddypress_header_menu_enable' ) == '' ) { if ( ! is_user_logged_in() ) { $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Log in', '__x__' ) . '</span></a></li>'; } else { $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_user_profile_url( get_current_user_id() ) . '" class="cf"><i class="x-icon-cog" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Profile', '__x__' ) . '</span></a></li>'; } } if ( $args->theme_location == 'primary' ) { $items .= '<li class="menu-item current-menu-parent menu-item-has-children x-menu-item x-menu-item-bbpress">' . '<a href="' . get_post_type_archive_link( bbp_get_forum_post_type() ) . '" class="x-btn-navbar-bbpress">' . '<span><i class="x-icon-comment" data-x-icon="" aria-hidden="true"></i> ' . __( 'Forums', '__x__' ) . '</span>' . '</a>' . '<ul class="sub-menu">' . $submenu_items . '</ul>' . '</li>'; } } return $items; } add_filter( 'wp_nav_menu_items', 'x_bbpress_navbar_menu', 9996, 2 );
You can copy the raw code here (http://pastebin.com/gA0T6LsQ) to preserve the unicode html entities or data-x-icon values. Feel free to add more links to that code if you want to.
Hope this helps. Please let us know how it goes.
August 15, 2016 at 8:21 am #1131836Thank you! It worked perfectly!! 😀 Much appreciated
August 15, 2016 at 9:14 am #1131881Glad it worked 😉
If you need anything else please let us know.
August 28, 2016 at 12:28 pm #1150661Hi In regards to the above can I please have the code to change the navigation icon with the person to say members? thank you
August 28, 2016 at 4:36 pm #1150800Hi there,
From the code above, you’ll see something like this
<i class="x-icon-male" data-x-icon="" aria-hidden="true"></i>
It’s the
data-x-icon=""
that dictates which icon is to load. You can find all icon codes here http://fontawesome.io/cheatsheet/Hence, if you wish to change the icon then just change its value, example,
<i class="x-icon-male" data-x-icon="" aria-hidden="true"></i>
Hope this helps.
August 28, 2016 at 7:10 pm #1150906I do not understand? Can you please just tell me the whole thing together? Or are you saying to add that to the code I already have?
-
AuthorPosts