• Resolved lawix

    (@lawix)


    Hi

    I modified the breadcrumb to display the parent category. I think if would be convenient for everyone. Would it be possible to put it in the next updates?

    File : framework/class-agama-breadcrumb.php
    Function :

            private static function is_single_or_page() {
                    global $post;
                    $h1     = sprintf( '<h1>%s</h1>', $post->post_title );
                    if ( $post->post_parent ) {
                            $output = sprintf( '<li class="active"><a href="%s">%s</a> / %s </li>' ,get_permalink($post->post_parent) ,get_the_title($post->post_parent) ,$post->post_title );
                    } else {
                            $output = sprintf( '<li class="active">%s </li>', $post->post_title );
                    }
                    self::html_markup( $h1, $output );
            }

    How else can I do so that this file is not updated?

    Thank you in advance
    William

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author themevision

    (@themevision)

    Hi, William!

    Thank you for the suggestion!

    If you want to avoid changes in the future updates, use the
    Child theme.
    Child theme
    You can use the Child theme configurator plugin to make the child theme from your existing theme.
    With this plugin, you can copy existing widgets, menus and Customizer options to child theme.

    Regards

    Thread Starter lawix

    (@lawix)

    Hi,
    Thank’s
    It’s possible in to wp-content/themes/agama-child/framework/class-agama-breadcrumb.php to overide only the “is_single_or_page” function ?

    Thanks you in advance
    William

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Parent link to breadcrump’ is closed to new replies.