• Resolved OlegApanovich

    (@mrdollar4444)


    Hi, please confirm a bug.

    Path to recreate.

    1. Install and activate plugin.
    2. Add new translation Spanish language
    3. Go to functions.php theme file and add code

    add_filter(‘the_title’, ‘foo’);
    function foo( $title ) {
    return ”;
    }

    add_action(‘loop_start’, ‘bar’);
    function bar() {
    ob_start();
    var_dump( get_the_title() );
    $imp_to_file = ob_get_clean();
    file_put_contents(‘/var/www/html/test.html’, $imp_to_file, FILE_APPEND);
    }

    4. Go to english page. And it ok get_the_title() return nothing

    5. Go to the Spanish page and observe the issue get_the_title() returns redundant trp-post-container empty tag here.

    It’s produse issue cose frequently theme athors rely on this function get_the_title to check if they need ourput their own title markup

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Let me check this and I will let you know when I have more information.

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi again,

    We use an output buffer to translate the site and strip those tags before you receive the HTML. Try and wrap get_the_title with our translation function:?https://translatepress.com/docs/translation-function/
    Or disable those tags from TP Settings -> Advanced tab -> Debug section -> Disable post container tags for post title option.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redundant markup in the title.’ is closed to new replies.