/webmasters/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
-
Odd Category Pages Showing in Search Results 3 Recommended Answers 10 Replies 4 Upvotes
1 Recommended Answer
$0 Recommended Answers
1 Relevant Answer
$0 Relevant Answers
Super weirdness I’d love some guidance on…

I have a WordPress site, using the Divi theme, and Yoast Premium. I have all category, etc pages set to no index via the plugin. However, Google keeps showing these odd category pages in the results. (/?cat=-1)

I thought I had this figured out after speaking with a Yoast tech support rep where I would just use the Google Search Console “Inspect URL” function and then it would realize that the canonical for that page was the actual article and not the odd category page.

That worked for a day and my new post shot up instantly from not ranking to the 2nd page of Google search results. I was pumped.

But, I googled the keywords I was trying to rank for again the next day and it dropped from the rankings, only to find that weird category page ranking about 8 pages down the list.

I’m not even sure how these pages are created and I’m not able to edit them on the back end of Wordpress like my other posts and pages.

Here is the odd category page that keeps coming up: https://www.aframeforward.com/?cat=-1

Here is the actual article/keywords I was trying to rank for “Laguna Beach Engagement Photo Locations” – https://www.aframeforward.com/7-best-laguna-beach-engagement-photo-locations/

I also did a site:aframeforward.com search and found a bunch of these showing up there too. I did the "Inspect URL"  on all of those but they are all back showing in the results.

Yoast is recommending a ‘Regex redirect’ to fix this if I can’t get any solutions via this forum. Is this a good idea?

I’m also wondering if the “Removal” tool in Google Search Console is also a good option for this?

Any ideas why this is happening and how I fix it?

Thanks so much!

=D
Most Relevant Answer Most Relevant Answers (0)
All Replies (10)
Most Relevant Answer
Just for reference, I dug a bit in wordpress source. Seems it tries to support negative cat ids, to function as exclude filter
 
 
$cat_array = preg_split('/[,\s]+/', $q['cat']);
                        $q['cat'] = '';
                        $req_cats = array();
                        foreach ( (array) $cat_array as $cat ) {
                                $cat = intval($cat);
                                $req_cats[] = $cat;
                                $in = ($cat > 0);
                                $cat = abs($cat);
                                if ( $in ) {
                                        $q['category__in'][] = $cat;
                                        $q['category__in'] = array_merge( $q['category__in'], get_term_children($cat, 'category') );
                                } else {
                                        $q['category__not_in'][] = $cat;
                                        $q['category__not_in'] = array_merge( $q['category__not_in'], get_term_children($cat, 'category') );
                                }
                        }
 
This is from wp-includes/query.php
 
So that is what is being 'shown'. All posts NOT in category 1!
 
I would guess this is such little known functionality, that your theme, and perhaps even Yoast, is not 'seeing' it as a real category page. Hence yoast does not inject the noindex tag, and the rel=canonical is being created incorrectly. 
 
(dont have Yoast installed to check it source) 
marked this as an answer
Most relevant based on info available
-
Most Relevant Answer
Thanks Barry, I appreciate you looking into this for me. Code is not my area of expertise so I'm not really sure of the proper solution I should take action on here.


Any other insight or direction is greatly appreciated.

Thank you!

=D
marked this as an answer
Most relevant based on info available
-
Most Relevant Answer
Okay, thanks again Barry. Your help is very much appreciated!

=D
marked this as an answer
Most relevant based on info available
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/webmasters/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
/webmasters/profile/0?hl=en