• Resolved Xaib Aslam

    (@lahorimela)


    Hello, I update your plugin and after that, I am having issues, my page title is not coming up properly. I don’t understand how your plugin is working right now. This is what (https://prnt.sc/wj6in9) I have added and you can see what I am getting. I have shared my link.

    Right now this is happening in pages only.

    • This topic was modified 3 years, 3 months ago by Xaib Aslam.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • I am also experiencing issues with the title tags not displaying correctly. I reached out to AIOSEO support and was advised it was a theme issue and nothing to do with the plugin. I have since seen the same problem on dozens of websites that are all using different themes. Absolute disgrace to what has been an amazing plugin for a very long time.

    Thread Starter Xaib Aslam

    (@lahorimela)

    No its not the theme issue, I reinstalled the old version and working fine. when I go to the new version then I lost the titles

    Thread Starter Xaib Aslam

    (@lahorimela)

    any help regarding this?

    Most probably you have WP query loop without wp_reset_postdata somewhere in the theme, and that causes different post title appear.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @lahorimela,

    What happens when you switch to the default TwentyTwenty theme?

    – Arnaud

    Thread Starter Xaib Aslam

    (@lahorimela)

    @soundstrategies but it was working before and there is no wp_reset_postdata in my template.

    Thread Starter Xaib Aslam

    (@lahorimela)

    @arnaudbroes when I switch to default it’s working fine. I don’t understand what I am missing.

    This is what I am using to query the posts.

    <?php 
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $args =  get_post_meta($post->ID, 'job_tag', true);
    $wp_query->query('tag='.$args.'&posts_per_page=12&paged='.$paged);
    while ($wp_query->have_posts()) : $wp_query->the_post();
    ?>
    • This reply was modified 3 years, 3 months ago by Xaib Aslam.
    • This reply was modified 3 years, 3 months ago by Xaib Aslam.

    Hi Xaibi,

    plugin logic changed, and it become critical to follow standards of WP_Query usage: https://developer.wordpress.org/reference/classes/wp_query/ – please refer examples and wp_reset_postdata usage. So you might need to review your theme code to put wp_reset_postdata where it is needed and is missed.

    Thread Starter Xaib Aslam

    (@lahorimela)

    @soundstrategies thanks for the information but I am not a dev, I do search and then do experiments, so I have no idea what to do now. If you have some time can you share the code? This is the loop I am using…

    <?php $count = 1; ?>
    
    <?php 
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $args =  get_post_meta($post->ID, 'job_tag', true);
    $wp_query->query('tag='.$args.'&posts_per_page=12&paged='.$paged);
    while ($wp_query->have_posts()) : $wp_query->the_post();
    ?>
    
    <?php get_template_part('includes/job-loop'); ?>
    
    <?php if ($count == 6) : ?>
    (MY AD CODE)				
    <?php endif; $count++; ?>
    
    <?php endwhile; ?>
    • This reply was modified 3 years, 3 months ago by Xaib Aslam.

    as I can see “og:title” and “twitter:title” meta fields are set correctly, so this might be some other theme related issue actually.

    Thread Starter Xaib Aslam

    (@lahorimela)

    @soundstrategies I found an HTML template and insert WordPress inside and it was working fine, after the update of AIO SEO, I got an issue.

    try to remove <title> definition from header.php file (if it is in place) and add add_theme_support( 'title-tag' ); into functions.php : https://make.wordpress.org/core/2014/10/29/title-tags-in-4-1/
    https://codex.wordpress.org/Title_Tag

    the strange part is that title works fine for pages like https://jobsalert.pk/invigilator-jobs-in-ots-2016-online-registration-latest-advertisement/40750 so I probably won’t be able to help you.

    Can you try to add Separator and Site Title to the Page Title to see if it will take any effect?

    Thread Starter Xaib Aslam

    (@lahorimela)

    then I think I have to move back to the v3 of AIO SEO

    Xaibi,

    at the end of your code, after:
    <?php endwhile; ?>
    try to put:
    <?php wp_reset_postdata(); ?>

    It might not help, but worth to try.

    Thread Starter Xaib Aslam

    (@lahorimela)

    @soundstrategies if I remove endwhile code get messed up.

    Parse error: syntax error, unexpected end of file in /home/jobs/public_html/wp-content/themes/jobs/template-org.php on line 257

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘AIOSEO having some issues’ is closed to new replies.