How to over-ride meta data in Wordpress using Squirrly SEO

0 votes

I currently have a Wordpress website using Squirrly for SEO. However, on archive pages, it is using descriptions/titles from the first content page that belongs to the archive page.

So for example, on my accommodation archive page, that lists all the hotels, the title is "Hotel 1", and the description is "Hotel 1 is a beautiful...". They should instead be referencing the title "List of Accommodation", and description "These are all the hotels...".

I am trying to write an over-ride for this - I did find one for Yoast SEO listed here - https://wordpress.stackexchange.com/questions/61472/using-php-to-overwrite-or-replace-title-tag-while-using-yoast/61523#61523?newreg=a3496de25de941a7bb16089b1912653b but this is not working, assumedly because wpseo_title is a filter specific to Yoast.

My current code is:

<?php get_header();
    if ( is_archive() ) {
        add_filter('wpseo_metadesc', 'filter_product_wpseo_metadesc');
            function filter_product_wpseo_metadesc($wpseo_metadesc) {
                if(  is_singular( 'product') ) {
                    $wpseo_metadesc = "This is a big test of stuff";
                }
                return $wpseo_metadesc;
            }
} ?>

Does anyone know a filter, or similar, that would over-ride the SEO for my archive pages, either specific to Squirrly SEO, or one which would work in general?

Mar 4 in Digital Marketing by Kichu
• 19,040 points
47 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Digital Marketing

0 votes
1 answer

How to over-ride meta data in Wordpress, using Squirrly SEO

if (is_archive()){ add_filter('sq_title', 'filter_product_wpseo_metadesc'); function filter_product_wpseo_metadesc($wpseo_metadesc){ ...READ MORE

answered Mar 1 in Digital Marketing by narikkadan
• 37,660 points
227 views
0 votes
1 answer

How to remove home page title in Yoast SEO?

Here, you have two possibilities. You can ...READ MORE

answered Mar 4 in Digital Marketing by narikkadan
• 37,660 points
602 views
0 votes
0 answers

Wordpress Plug-ins: How-to add custom SEO friendly URL Handles

I was wondering if its possible to ...READ MORE

Mar 5 in Digital Marketing by Kichu
• 19,040 points
99 views
0 votes
1 answer

How to get Stack Overflow SEO friendly URL structure in Nuxt.js?

The following worked for me : To get ...READ MORE

answered Mar 11 in Digital Marketing by narikkadan
• 37,660 points
618 views
0 votes
0 answers

Wordpress All In One SEO plugin not sharing to Facebook wall

I use to implement Facebook's OpenGRaph protocol ...READ MORE

Mar 12 in Digital Marketing by Kichu
• 19,040 points
167 views
0 votes
1 answer

The uploaded file exceeds the upload_max_filesize directive in php.ini error while uploading plugin

After looking at your ERROR, it seems ...READ MORE

answered Feb 8 in Others by Soham
• 9,670 points
127 views
0 votes
0 answers
0 votes
1 answer

How to Access Yoast SEO tags in Wordpress API Callback

use rest api to request for the ...READ MORE

answered Feb 12 in Others by narikkadan
• 37,660 points
458 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP