Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1478728

    I use show Breadcrum and Title. And i want to replace “Blog – Aktuelle Neuigkeiten” with the name of the actual post?

    i have always this code in the child theme function and can change the html code.

    if( ! function_exists( ‘avia_title’ ) )
    {
    /**
    * advanced title + breadcrumb function
    *
    * @param array|string|false $args
    * @param int|false $id
    * @return string
    */
    function avia_title( $args = false, $id = false )
    {
    global $avia_config;

    if( ! $id )
    {
    $id = avia_get_the_id();
    }

    $header_settings = avia_header_setting();

    if( $header_settings[‘header_title_bar’] == ‘hidden_title_bar’ )
    {
    return ”;
    }

    $defaults = array(
    ‘title’ => get_the_title( $id ),
    ‘subtitle’ => ”, //avia_post_meta($id, ‘subtitle’),
    ‘link’ => get_permalink( $id ),
    ‘html’ => “<div class='{class} ‘><div class=’container’>{heading_html}{additions}</div></div>”,
    ‘heading_html’ => “<{heading} class=’main-title entry-title {heading_class}’>{title}</{heading}>”,
    ‘class’ => ‘stretch_full container_wrap ‘ . avia_is_dark_bg( ”, true ),
    ‘breadcrumb’ => true,
    ‘additions’ => ”,
    ‘heading’ => ‘h1’, //headings are set based on this article: http://yoast.com/blog-headings-structure/
    ‘heading_class’ => ”
    );

    if( is_tax() || is_category() || is_tag() )
    {
    global $wp_query;

    $term = $wp_query->get_queried_object();
    $defaults[‘link’] = get_term_link( $term );
    }
    else if( is_archive() )
    {
    $defaults[‘link’] = ”;
    }

    // Parse incomming $args into an array and merge it with $defaults
    $args = wp_parse_args( $args, $defaults );

    /**
    * @used_by config-woocommerce\config.php avia_title_args_woopage() 10
    * @since < 4.0
    * @return array
    */
    $args = apply_filters( ‘avf_title_args’, $args, $id );

    //disable breadcrumb if requested
    if( $header_settings[‘header_title_bar’] == ‘title_bar’ )
    {
    $args[‘breadcrumb’] = false;
    }

    //disable title if requested
    if( $header_settings[‘header_title_bar’] == ‘breadcrumbs_only’ )
    {
    $args[‘title’] = ”;
    }

    // OPTIONAL: Declare each item in $args as its own variable i.e. $type, $before.
    extract( $args, EXTR_SKIP );

    if( empty( $title ) )
    {
    $class .= ‘ empty_title ‘;
    }

    $markup = avia_markup_helper( array( ‘context’ => ‘avia_title’, ‘echo’ => false ) );

    if( ! empty( $link ) && ! empty( $title ) )
    {
    $title = “” . $title . ““;
    }

    if( ! empty( $subtitle ) )
    {
    $additions .= “<div class=’title_meta meta-color’>” . wpautop( $subtitle ) . ‘</div>’;
    }

    if( $breadcrumb )
    {
    $additions .= Avia_Breadcrumb_Trail()->get_trail( array( ‘separator’ => ‘ ‘, ‘richsnippet’ => true ) );
    }

    if( ! $title )
    {
    $heading_html = ”;
    }

    $html = str_replace( ‘{heading_html}’, $heading_html, $html );

    $html = str_replace( ‘{class}’, $class, $html );
    $html = str_replace( ‘{title}’, $title, $html );
    $html = str_replace( ‘{additions}’, $additions, $html );
    $html = str_replace( ‘{heading}’, $heading, $html );
    $html = str_replace( ‘{heading_class}’, $heading_class, $html );

    // removed 4.9 avia_is_dynamic_template()
    // if( ! empty( $avia_config[‘slide_output’] ) && ! avia_is_dynamic_template( $id ) && ! avia_is_overview() )

    if( ! empty( $avia_config[‘slide_output’] ) && ! avia_is_overview() )
    {
    $avia_config[‘small_title’] = $title;
    }
    else
    {
    return $html;
    }
    }
    }

    #1478735

    the post title exist in the breadcrumb… i need the post title as title

    #1478737
    #1478739

    Hi,

    Thank you for the inquiry.

    Is the avia_title override still active? What happens when you disable it? The filter provided in the following threads might help:

    https://kriesi.at/support/topic/change-blog-latest-news-title/#post-1467939
    https://kriesi.at/support/topic/change-blog-latest-news-title/#post-1467959

    You may need to update this condition and use the actual title of your blog page.

    if ( $args['title'] == 'Blog - Latest News' ) {
    

    Best regards,
    Ismael

    #1478745

    whehre do it put it?

    #1478747

    i have deleted the overider and put your code, but doesnt work…
    have i do the german text in the function?

    #1478749

    ok got it. with the german text it work!

    #1478754

    thanks!
    the thread can be closed

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Replace “Blog – Aktuelle Neuigkeiten” with …’ is closed to new replies.