Moin,
ich lege über ein PHP-Skript hin und wieder eine neue Seite an. Klappt ohne Probleme:
Code
$neueseite = array(
'post_title' => $xxxxxx,
'post_type' => 'page',
'post_content' => $text,
'post_status' => 'publish',
'post_parent' => 0,
'post_author' => get_current_user_id(),
'page_template' => 'templates/template_xxxxxx.php'
);
$result = wp_insert_post( $neueseite );
Klappt prima. Jetzt die Frage: Wie muss ich diese Routine modifizieren, dass die Seite gleich auf NoIndex und NoFollow gesetzt wird, so dass Google etc. sie gar nicht erst in seinen Index aufnimmt?
Ich hatte gedacht, dass das über noindex() geht, diese Function ist aber deprecated, verweist auf wp_no_robots() die auch deprecated ist, die auf die Function wp_robots_no_robots() verweist
https://developer.wordpress.org/reference/functions/wp_no_robots/
die aber nicht existiert.
AS