Vertical lines between navigation labels
-
Hi,
Could you let me know how to put vertical lines between navigation labels as it is now using greater symbol (>) in ColorWay as follows:
HOME | WORK | RESUME | CONTACT
Thank you
-
HI-@doan quang
Solution to your problem is first of all create Child Theme
Then Go to main theme’s folder->functions->inkthemes-functions.php
In inkthemes-functions.php file search for below functionfunction inkthemes_breadcrumbs() { $delimiter = '»'; //function's remaining code }Copy this entire function (not whole file) in you child theme’s folder functions.php
Then inside that function edit one line as below:function inkthemes_breadcrumbs() { $delimiter = '∣'; //Remaning code as it is }Thank You!1
Thank you Sanjog,
As I did create a child them but there are only 04 files:
header.php,
footer.php;
split_slider.php
style.cssSo do I have to copy the file “inkthemes-functions.php” into my child theme folder and edit as you suggested.
Thank you
Hey @doan quang
It seems you created your child theme in worng way.
Just create folder named your-theme-name-child
And inside that folder you need to have functions.phh and style.css file.
Then the next step is to edit the functions.php in child’s theme folder as I mentioned above.You may research How to create child theme in more detail.
You can report if you are still facing problem.Thank You!!
Hi Sanjog,
Thank you so much and let me tell you what I have done.
I created a functions.php and put the below information in this file.
<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );}
?>I looked at my inkthemes-functions.php file and I found below relevant information from Line 63 to line 146.
function inkthemes_breadcrumbs() {
$delimiter = ‘»’;
$home = __( ‘Home’, ‘colorway’ ); // text for the ‘Home’ link
$before = ‘<span class=”current”>’; // tag before the current crumb
$after = ‘</span>’; // tag after the current crumb
echo ‘<div id=”crumbs”>’;
global $post;
}I copied and pasted this information to the functions.php in the child them and revised
function inkthemes_breadcrumbs() {
$delimiter = ‘∣’;
//Remaning code as it is
}but I did not work.
Kindly let me know if I did something wrong.
Thanks
The correct inkthemes-functions.php relevant information from Line 63 to line 146 is:
function inkthemes_breadcrumbs() {
$delimiter = ‘»’;
$home = __( ‘Home’, ‘colorway’ ); // text for the ‘Home’ link
$before = ‘<span class=”current”>’; // tag before the current crumb
$after = ‘</span>’; // tag after the current crumb
echo ‘<div id=”crumbs”>’;
global $post;
$homeLink = esc_url( home_url() );
echo ‘‘ . $home . ‘ ‘ . $delimiter . ‘ ‘;
if ( is_category() ) {}
Hi @doan quang
I think you forgot to activate child theme??
If again you are having trouble i will give you a full guide with code.Thank You!!
Hi Sanjog,
Sorry but I need your assistance, I copied and pasted line 63 to line 146 from inkthemes-functions.php to my new created functions.php in the child them and revised “$delimiter = ‘∣’;” but it did not work.
Your kind assistance is highly appreciated. Thank you
Hi @doan quang
Ok Please follow the step carefully
1. In main theme’s folder -> functions -> inkthemes-functions.php file
2.In that inkthemes-functions.php file from line 63 to 143 Replace below codeif(!function_exists('inkthemes_breadcrumbs')){ function inkthemes_breadcrumbs() { $delimiter = '»'; $home = __( 'Home', 'colorway' ); // text for the 'Home' link $before = '<span class="current">'; // tag before the current crumb $after = '</span>'; // tag after the current crumb echo '<div id="crumbs">'; global $post; $homeLink = esc_url( home_url() ); echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' '; if ( is_category() ) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $thisCat = get_category( $thisCat ); $parentCat = get_category( $thisCat->parent ); if ( $thisCat->parent != 0 ) echo(get_category_parents( $parentCat, TRUE, ' ' . $delimiter . ' ' )); echo $before . __( 'Archive by category', 'colorway' ) . ' "' . single_cat_title( '', false ) . '"' . $after; } elseif ( is_day() ) { echo '<a href="' . esc_url( get_year_link( get_the_time( 'Y' ) ) ) . '">' . get_the_time( 'Y' ) . '</a> ' . $delimiter . ' '; echo '<a href="' . esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ) . '">' . get_the_time( 'F' ) . '</a> ' . $delimiter . ' '; echo $before . get_the_time( 'd' ) . $after; } elseif ( is_month() ) { echo '<a href="' . esc_url( get_year_link( get_the_time( 'Y' ) ) ) . '">' . get_the_time( 'Y' ) . '</a> ' . $delimiter . ' '; echo $before . get_the_time( 'F' ) . $after; } elseif ( is_year() ) { echo $before . get_the_time( 'Y' ) . $after; } elseif ( is_single() && !is_attachment() ) { if ( get_post_type() != 'post' ) { $post_type = get_post_type_object( get_post_type() ); $slug = $post_type->rewrite; echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $delimiter . ' '; echo $before . get_the_title() . $after; } else { $cat = get_the_category(); $cat = $cat[0]; echo get_category_parents( $cat, TRUE, ' ' . $delimiter . ' ' ); echo $before . get_the_title() . $after; } } elseif ( !is_single() && !is_page() && get_post_type() != 'post' ) { $post_type = get_post_type_object( get_post_type() ); echo $before . $post_type->labels->singular_name . $after; } elseif ( is_attachment() ) { $parent = get_post( $post->post_parent ); $cat = get_the_category( $parent->ID ); $cat = $cat[0]; echo get_category_parents( $cat, TRUE, ' ' . $delimiter . ' ' ); echo '<a href="' . esc_url( get_permalink( $parent ) ) . '">' . $parent->post_title . '</a> ' . $delimiter . ' '; echo $before . get_the_title() . $after; } elseif ( is_page() && !$post->post_parent ) { echo $before . get_the_title() . $after; } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ( $parent_id ) { $page = get_page( $parent_id ); $breadcrumbs[] = '<a href="' . esc_url( get_permalink( $page->ID ) ) . '">' . get_the_title( $page->ID ) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse( $breadcrumbs ); foreach ( $breadcrumbs as $crumb ) echo $crumb . ' ' . $delimiter . ' '; echo $before . get_the_title() . $after; } elseif ( is_search() ) { echo $before . __( 'Search results for', 'colorway' ) . ' "' . get_search_query() . '"' . $after; } elseif ( is_tag() ) { echo $before . __( 'Posts tagged ', 'colorway' ) . '"' . single_tag_title( '', false ) . '"' . $after; } elseif ( is_author() ) { global $author; $userdata = get_userdata( $author ); echo $before . __( 'Articles posted by ', 'colorway' ) . $userdata->display_name . $after; } elseif ( is_404() ) { echo $before . __( 'Error 404', 'colorway' ) . $after; } if ( get_query_var( 'paged' ) ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' ('; echo __( 'Page', 'colorway' ) . ' ' . get_query_var( 'paged' ); if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')'; } echo '</div>'; } }3.Create a new folder named colorway-child
4.Inside that folder create two new file functions.php and style.css
5.Now in style.css file copy paste following code only/* Theme Name: ColorWay Child Theme URI: http://www.inkthemes.com/wp-themes/colorway-wp-theme/ Description: Colorway is Simple, Elegant, Responsive and beautiful Theme with Easy Customization Options built by InkThemes.com. The Customization Options includes using your own Logos, Backgrounds, Analytics and your own Custom Footer Texts and Analytics that can be tweaked using Theme Options Panel. Colorway Theme is Single Click Intall feature, Just press activate button and your website will get ready with all the dummy content. Just set the content from the Themes Options Panel. Colorway by InkThemes.com is suitable for any business or personal website. The Theme can work for various different niches. It includes special styles for Gallery pages, and has an optional fullwidth page template as well. Author: InkThemes.com Author URI: http://www.inkthemes.com Template: ColorWay Version: 3.4.0 License: GNU General Public License License URI: license.txt Tags: black, blue, green, white, gray, custom-menu, dark, two-columns, fixed-layout, custom-header, custom-background, threaded-comments, sticky-post, custom-colors, custom-header, custom-menu, light, theme-options, editor-style Text Domain: colorway */6.Then save it and we are done with style.css file.
7.Now in function.php file copy and paste the following code only<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } function inkthemes_breadcrumbs() { $delimiter = '∣'; $home = __( 'Home', 'colorway' ); // text for the 'Home' link $before = '<span class="current">'; // tag before the current crumb $after = '</span>'; // tag after the current crumb echo '<div id="crumbs">'; global $post; $homeLink = esc_url( home_url() ); echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' '; if ( is_category() ) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $thisCat = get_category( $thisCat ); $parentCat = get_category( $thisCat->parent ); if ( $thisCat->parent != 0 ) echo(get_category_parents( $parentCat, TRUE, ' ' . $delimiter . ' ' )); echo $before . __( 'Archive by category', 'colorway' ) . ' "' . single_cat_title( '', false ) . '"' . $after; } elseif ( is_day() ) { echo '<a href="' . esc_url( get_year_link( get_the_time( 'Y' ) ) ) . '">' . get_the_time( 'Y' ) . '</a> ' . $delimiter . ' '; echo '<a href="' . esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ) . '">' . get_the_time( 'F' ) . '</a> ' . $delimiter . ' '; echo $before . get_the_time( 'd' ) . $after; } elseif ( is_month() ) { echo '<a href="' . esc_url( get_year_link( get_the_time( 'Y' ) ) ) . '">' . get_the_time( 'Y' ) . '</a> ' . $delimiter . ' '; echo $before . get_the_time( 'F' ) . $after; } elseif ( is_year() ) { echo $before . get_the_time( 'Y' ) . $after; } elseif ( is_single() && !is_attachment() ) { if ( get_post_type() != 'post' ) { $post_type = get_post_type_object( get_post_type() ); $slug = $post_type->rewrite; echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $delimiter . ' '; echo $before . get_the_title() . $after; } else { $cat = get_the_category(); $cat = $cat[0]; echo get_category_parents( $cat, TRUE, ' ' . $delimiter . ' ' ); echo $before . get_the_title() . $after; } } elseif ( !is_single() && !is_page() && get_post_type() != 'post' ) { $post_type = get_post_type_object( get_post_type() ); echo $before . $post_type->labels->singular_name . $after; } elseif ( is_attachment() ) { $parent = get_post( $post->post_parent ); $cat = get_the_category( $parent->ID ); $cat = $cat[0]; echo get_category_parents( $cat, TRUE, ' ' . $delimiter . ' ' ); echo '<a href="' . esc_url( get_permalink( $parent ) ) . '">' . $parent->post_title . '</a> ' . $delimiter . ' '; echo $before . get_the_title() . $after; } elseif ( is_page() && !$post->post_parent ) { echo $before . get_the_title() . $after; } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ( $parent_id ) { $page = get_page( $parent_id ); $breadcrumbs[] = '<a href="' . esc_url( get_permalink( $page->ID ) ) . '">' . get_the_title( $page->ID ) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse( $breadcrumbs ); foreach ( $breadcrumbs as $crumb ) echo $crumb . ' ' . $delimiter . ' '; echo $before . get_the_title() . $after; } elseif ( is_search() ) { echo $before . __( 'Search results for', 'colorway' ) . ' "' . get_search_query() . '"' . $after; } elseif ( is_tag() ) { echo $before . __( 'Posts tagged ', 'colorway' ) . '"' . single_tag_title( '', false ) . '"' . $after; } elseif ( is_author() ) { global $author; $userdata = get_userdata( $author ); echo $before . __( 'Articles posted by ', 'colorway' ) . $userdata->display_name . $after; } elseif ( is_404() ) { echo $before . __( 'Error 404', 'colorway' ) . $after; } if ( get_query_var( 'paged' ) ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' ('; echo __( 'Page', 'colorway' ) . ' ' . get_query_var( 'paged' ); if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')'; } echo '</div>'; } ?>8.Now Go to Dashboard -> Appearance ->Theme
9.In theme you will see a theme name ColorWay Child
10.Activate that theme and hope your problem will be solved.You can report if problem is not solved.
Thank You!!
Hi Sanjog,
Thank you very much for your kind support, I followed your suggestions and unfortunately it said “ColorWay Child The parent theme is missing. Please install the “ColorWay” parent theme.”
Thanks
My website is http://vietnamese-translator.com/
Hi Sanjog,
I have done it over again and it is the same HOME > PROFILE> CONTACT
Hi -@doan quang
Are you refering > sign in your main navigation
See This link
So that i can understand your main problem.
You can ask as many times as you can until your problem is solved.Thank You!
Hi Sanjog,
Yes, sorry if I made you confused.
I want my main navigation now “HOME > PROFILE > SERVICES | CONTACT” to be changed to “”HOME | PROFILE | SERVICES | CONTACT”
All > signs to be changed to | signs please. Thanks
Hi @doan quang
The > sign appears if it has sub-navigation other wise it doesnot appear however if you want | to be displayed in sub-navigation menu I can help.
Please tell me what do you want.
Do you want | after each menu???Thank You!
The topic ‘Vertical lines between navigation labels’ is closed to new replies.
