why the post title is not the browser title

#55950
  • Resolved Amit Meyraz
    Rank Math free

    hi,
    i put %title% it tags, but i am not getting a title in the browser when i activate rankmath.
    if i disable rankmath i get the post title/

    here is an example:
    https://mschool.co.il/course/7726/lessons/4-2/

    i change title to english, it will be more easy to notice that.

    the title of post “the city citizens” but its not show as title in the browser or in the page.
    if i disable rankmath, it will show as title.

    Please check
    BR
    Amit

Viewing 7 replies - 16 through 22 (of 22 total)
  • hi,
    i put that:
    %sitename% %sep% %title%

    but its the same problem, its ignore the title in lessons:

    look: https://mschool.co.il/course/total/lessons/%d7%94%d7%93%d7%99%d7%9c%d7%9e%d7%95%d7%aa-%d7%95%d7%a8%d7%90%d7%a9%d7%99-%d7%94%d7%92%d7%98%d7%90%d7%95%d7%aa/

    the title of post/lesson is “something”
    do you see “something as” a title?
    no, the title is category name and site name. but i am using:
    %sitename% %sep% %title%

    BR
    Amit

    Hello,

    Thank you for contacting Rank Math today.

    I checked the link you provided and here is a screenshot: https://i.rankmath.com/TljiIP
    I translated and checked, they are the same as the browser title. Please let us know if there is something we missed.

    Looking forward to helping you. Thank you.

    ​​​​​​

    hi,

    but the problem that this is not the title,
    the title is: “something”

    HERE IS A VIDEO (30 second) WITH EXPLANTION WITH VOICE PLEASE LOOK AT THAT, i think it will explain the problem.
    https://www.screencast.com/t/jSiFFglq

    BR
    Amit

    Hello,

    The Lesson page you see on the frontend is not actually the lessons page they are the part of the courses page which plugin author is creating using rewrite_rules and template_redirect. So the %title% variable there returns the Course title instead of Lesson Title.

    You can use following filter code to prevent Rank Math from changing the Title on Lessons page:

    
    add_filter( 'rank_math/frontend/title', function( $title ) {
        if ( IS_LEARNPRESS_PAGE_CONDITION ) {
            return '';
        }
        
        return $title;
    });
    

    Please add this code in functions.php file and change the IS_LEARNPRESS_PAGE_CONDITION to the condition to check if the page is the lessons page.

    I hope that helps.

    hi,

    you wrote:
    “Please add this code in functions.php file and change the IS_LEARNPRESS_PAGE_CONDITION to the condition to check if the page is the lessons page.”

    1. what it mean to change to “the condition” please explain.
    2. where is function.php file located?
    BR
    Amit

    • This reply was modified 4 years, 6 months ago by Amit Meyraz.

    HI

    YES IT WORKS THANK YOU THANK YOU.

    1. how can i remove course name from title?
    2. can i change the seperator look? now its an arrow, i dont know why.

    and thanks again.

    BR
    Amit

    Hello,

    Thank you for contacting Rank Math today.

    Your title settings seem to be generated by your plugin or them settings rather than Rank math. You can confirm this by temporarily deactivating Rank math and check the page source of your course or lesson

    Looking forward to helping you. Thank you.

    ​​​​​​

Viewing 7 replies - 16 through 22 (of 22 total)

You must be logged in to reply to this ticket.