Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-13-2025, 05:12 PM   #1
mightyjoe
Confirmed User
 
Join Date: Jun 2004
Posts: 1,395
Help: How to dissable or remove NOINDEX on wp-script theme?

We all know that wp-script has zero customer service.

Now I spent hours with chatgpt but no success. Also Yoast has no option to remove.

This <meta name='robots' content='noindex, follow' /> has all on SEARCH PAGE now I WANT TO DISSABLE that, PLEASE help me

I wonder why wp-script coded guy did that in auto. There should be an option to put or not.

PS: Pls dont ask me why I want to remove because serch page is blah blah, i want to remove it thats all
mightyjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2025, 05:18 PM   #2
TheLegacy
SEO Connoisseur
 
TheLegacy's Avatar
 
Industry Role:
Join Date: Apr 2003
Location: Brantford, Ontario
Posts: 16,325
what did chatgpt say about it? I asked the same question and got several answers.

also who do you host with?
__________________
SEO Connoisseur


Microsoft Teams: Robert Warren SEO
Skype: robjameswarren
RobertWarrenSEO.com
TheLegacy is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2025, 05:35 PM   #3
EddyTheDog
Just Doing My Own Thing
 
EddyTheDog's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 25,034
Dumb question, but why can't you just delete it? - What happens?..
__________________
-

Chaturbate Script - https://gfy.com/fucking-around-and-b...er-issues.html - Now supports White Labels
EddyTheDog is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2025, 07:20 PM   #4
mightyjoe
Confirmed User
 
Join Date: Jun 2004
Posts: 1,395
Quote:
Originally Posted by TheLegacy View Post
what did chatgpt say about it? I asked the same question and got several answers.

also who do you host with?
actually chatgpt figure it out for me after a looooot of insults, suggestions and questions. here are the code to go in fuunctions.php, it will removed the noindex in wp-script themes and replace with index, this works only in pages with ?s= and /search/

function replace_robots_meta_tag_for_search($buffer) {
// Check if the current page has a query string 's=' (search query)
if ( isset($_GET['s']) && !empty($_GET['s']) ) {
// Replace noindex with index in the robots meta tag
$buffer = preg_replace_callback(
'/<meta\s+name=[\'"]robots[\'"]\s+content=[\'"]noindex,\s*follow[\'"]\s*\/?>/i',
function($matches) {
return "<meta name='robots' content='index, follow' />";
},
$buffer
);
}
return $buffer;
}

function start_replace_robots_buffer_for_search() {
ob_start('replace_robots_meta_tag_for_search');
}
add_action('template_redirect', 'start_replace_robots_buffer_for_search');



function replace_robots_meta_tag_for_pretty_search($buffer) {
if ( is_search() ) {
// Replace noindex with index in the robots meta tag
$buffer = preg_replace_callback(
'/<meta\s+name=[\'"]robots[\'"]\s+content=[\'"]noindex,\s*follow[\'"]\s*\/?>/i',
function($matches) {
return "<meta name='robots' content='index, follow' />";
},
$buffer
);
}
return $buffer;
}

function start_replace_robots_buffer_for_pretty_search() {
ob_start('replace_robots_meta_tag_for_pretty_searc h');
}
add_action('template_redirect', 'start_replace_robots_buffer_for_pretty_search');


the upper one is for ?s=
and below that one is for /search/
so it works individually
mightyjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2025, 07:21 PM   #5
mightyjoe
Confirmed User
 
Join Date: Jun 2004
Posts: 1,395
Quote:
Originally Posted by EddyTheDog View Post
Dumb question, but why can't you just delete it? - What happens?..
if that can be simple, why not
mightyjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2025, 07:52 PM   #6
mightyjoe
Confirmed User
 
Join Date: Jun 2004
Posts: 1,395
and this is the code to noindex all the pages with ? except ?s=

chatgpt is great actually if you have clear prompt

function replace_robots_meta_tag_for_query_pages_except_sea rch($buffer) {
// Skip search pages (?s=)
if ( isset($_GET['s']) && !empty($_GET['s']) ) {
return $buffer;
}

// If the URL contains a query string
if ( strpos($_SERVER['REQUEST_URI'], '?') !== false ) {
// Replace any existing robots meta tag
$buffer = preg_replace(
'/<meta\s+name=[\'"]robots[\'"]\s+content=[\'"][^\'"]+[\'"]\s*\/?>/i',
"<meta name='robots' content='noindex, follow' />",
$buffer
);
}

return $buffer;
}

function start_replace_robots_buffer_for_query_pages_except _search() {
ob_start('replace_robots_meta_tag_for_query_pages_ except_search');
}
add_action('template_redirect', 'start_replace_robots_buffer_for_query_pages_excep t_search');
mightyjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2025, 08:14 PM   #7
mightyjoe
Confirmed User
 
Join Date: Jun 2004
Posts: 1,395
but these codes works only if Yoast is ACTIVATED :p
mightyjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
wp-script, option, dissable, remove, coded, thumbsup, page, auto, guy, customer, theme, noindex, service, spent, yoast, success, chatgpt, hours, search



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.