• Resolved kojiz

    (@kojiz)


    hello

    how to remove text “you are now on:” in breadcrumbs?

    how to resize container page title & breadcrumbs? too big for me

    sorry for bad english

    thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    Create a “Child-Theme” first to make the changes.

    Please provide the website URL.

    So we can assist you better.

    Thank You

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    To resize the container use below CSS rules into Custom CSS Editor:

    .page_title .breadcrumbs {
        margin: 13px 0 0px;
    }
    .page_title h1 {
        padding: 10px 0;
    }

    Save the changes.

    Thank You

    Thread Starter kojiz

    (@kojiz)

    – im still working in localhost

    – thats work, thanks

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    Its ok.

    Have you created “Child-Theme” ?

    Thank You.

    Thread Starter kojiz

    (@kojiz)

    not yet, how to create child-theme ?

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    There are many tutorial out there about creating child theme.
    You can try this http://demo.webhuntinfotech.com/blog/2016/01/11/how-to-create-a-child-theme/
    Thanks

    Thread Starter kojiz

    (@kojiz)

    i did it, what next?

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    Now create a “functions.php” file into your “Child-Theme” directory and paste

    below line of code in it.

    /* Breadcrumbs  */
    function kyma_breadcrumbs_child()
    {
        $delimiter = '<span class="crumbs-spacer"><i class="fa fa-angle-right"></i></span>';
        $home      = __('Home', 'kyma'); // text for the 'Home' link
        $before    = ''; // tag before the current crumb
        $after     = '</li>'; // tag after the current crumb
        echo '<ul class="breadcrumbs">';
        global $post;
        $homeLink = home_url();
        echo '<li><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 . '</li> '));
            }
    
            echo $before . _e("Archive by category ", 'kyma') . ' ' . single_cat_title('', false) . '"' . $after;
        } elseif (is_day()) {
            echo '<li><a href="' . esc_url(get_year_link(get_the_time('Y'))) . '">' . get_the_time('Y') . '</a>' . $delimiter . '</li>';
            echo '<li><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') . '</li>';
        } elseif (is_month()) {
            echo '<li><a href="' . esc_url(get_year_link(get_the_time('Y'))) . '">' . get_the_time('Y') . '</a>' . $delimiter;
            echo $before . get_the_time('F') . '</li>';
        } elseif (is_year()) {
            echo $before . get_the_time('Y') . '</li>';
        } elseif (is_single() && !is_attachment()) {
            if (get_post_type() != 'post') {
                $post_type = get_post_type_object(get_post_type());
                $slug      = $post_type->rewrite;
                echo '<li><a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $delimiter;
                echo $before . get_the_title() . '</li>';
            } else {
                $cat = get_the_category();
                $cat = $cat[0];
                echo $before . get_the_title() . '</li>';
            }
        } elseif (!is_single() && !is_page() && get_post_type() && get_post_type() != 'post') {
            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 '<li><a href="' . esc_url(get_permalink($parent)) . '">' . $parent->post_title . '</a>' . $delimiter;
            echo $before . esc_attr(get_the_title()) . $after;
        } elseif (is_page() && !$post->post_parent) {
            echo $before . esc_attr(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[] = '<li><a href="' . esc_url(get_permalink($page->ID)) . '">' . esc_attr(get_the_title($page->ID)) . '</a></li>';
                $parent_id     = $page->post_parent;
            }
            $breadcrumbs = array_reverse($breadcrumbs);
            foreach ($breadcrumbs as $crumb) {
                echo $crumb . ' ' . $delimiter . ' ';
            }
    
            echo $before . esc_attr(get_the_title()) . $after;
        } elseif (is_search()) {
            echo $before . _e("Search results for ", 'kyma') . esc_attr(get_search_query()) . '"' . $after;
        } elseif (is_tag()) {
            echo $before . _e('Tag ', 'kyma') . single_tag_title('', false) . $after;
        } elseif (is_author()) {
            global $author;
            $userdata = get_userdata($author);
            echo $before . _e("Articles posted by ", 'kyma') . $userdata->display_name . $after;
        } elseif (is_404()) {
            echo $before . _e("Error 404 ", 'kyma') . $after;
        }
        echo '</ul>';
    }

    After it again create “breadcrumbs.php” file into your

    “Child-Theme” directory and paste below line of code in it.

    <section class="content_section page_title">
        <div class="content clearfix">
            <h1 class=""><?php the_title(); ?></h1>
            <?php kyma_breadcrumbs_child(); ?>
        </div>
    </section>

    Save all the changes.

    Hope you will done.

    Lett us know for further assistance.

    Thank You.

    Thread Starter kojiz

    (@kojiz)

    thats work!!

    thank youuu

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Most Welcome.

    Cheers!

    Thank You

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘page title & breadcrumbs’ is closed to new replies.