custom COOKIE on custom page

by user1721620   Last Updated March 14, 2019 21:08 PM

i have problem with create function for set cookie dynamically.

when i try in custom page i have of course header is set and i tried something like this: in custompage.php:


in function.php

function myfunction($name,$value) {
function mySEOfunction($name,$value) {
echo "some meta tags...".$name...

i have Missing argument 2 in function.php i tried also this for SEO meta tags created dynamically but i have same problem...

any help?

Answers 1

If all you are doing is setting a cookie on a page then why the complexity? Check this out for a simple answer

My only thought is that you are then trying to redirect them back to Wordpress and if so you may wish to check this Setting custom cookies in Wordpress

I'd say your error "missing function 2" is coming from incorrect syntax for time.

December 07, 2015 00:52 AM

Related Questions

Change meta tags programatically

Updated July 10, 2016 08:03 AM

Remove meta robots tag from wp_head

Updated April 22, 2015 09:03 AM

add to head element based on shortcode contents

Updated May 02, 2017 02:08 AM

How to replace a function using a child theme?

Updated June 07, 2015 10:03 AM