I insert this and it works fine:
add_post_meta( get_the_ID(), ‘robots’, ‘TEXT’, true );
After adding that I check the database and everything is fine, the result is TEXT.
But if I insert this:
add_post_meta( get_the_ID(), ‘robots’, ‘a:2:{i:0;s:7:”noindex”;i:1;s:8:”nofollow”;}’, true );
The result is:
s:43:”a:2:{i:0;s:7:”noindex”;i:1;s:8:”nofollow”;}”;
And I need the result to be exactly the same as I have added it:
a:2:{i:0;s:7:”noindex”;i:1;s:8:”nofollow”;}
I need not to automatically add that s:43:” and the “; at the end.
Can anybody help me please?