Hello I have two date : Read more
Hi, I think Yoast SEO removed metakeywords. Please see this aricle : Meta keywords Why we don't use them - and neither should you use this key instead : _yoast_wpseo_focuskw You can update it like any post meta. This is the syntax: //the value of the focus key word $myFocusKeyword = "focus keyword eRead more
Hi,
I think Yoast SEO removed metakeywords. Please see this aricle :
Meta keywords Why we don’t use them – and neither should you
use this key instead :
_yoast_wpseo_focuskw
You can update it like any post meta. This is the syntax:
1 2 3 4 5 | //the value of the focus key word $myFocusKeyword = "focus keyword example"; //wrtie the value to postmeta key _yoast_wpseo_focuskw $updatedKeyword = update_post_meta($post_id, ‘_yoast_wpseo_focuskw’, $myFocusKeyword); |
I tested it and it works fine.
regards
See less
Please use this code: $first_date = new DateTime("2022-01-01"); $second_date = new DateTime("2023-02-02"); $difference = $first_date->diff($second_date); echo "<difference> = " . $difference->y . " years, " . $difference->m." months, ".$difference->d." days " . "<difference in dRead more
Please use this code:
It works as you expect
See less