• Hello,

    I copied and pasted this code per your instructions for the HOME page verification only. I put it into the function.php of the theme but it still pops up on all pages. Im green on this aspect. Maybe I need to clear the catch?

    Here is the code. I just added my website. Did I fill it in correct and where in the function page do I paste this code?

    Also, which function page? In the function.php of the actual theme? There are a few. Thanks for your help.

    function home_page_disable_verifier($checks){
    //Check if the current page is the home page
    if(is_home()){
    //If it is, add the check ID key, and set it to true.
    $checks[“www.bammcollective.com”] = true; // is_home_page can be whatever you want it to be. Make sure it’s unique!
    }
    else{
    //If not, add the check ID key, and set it to false.
    $checks[“www.bammcollective.com”] = false;
    }
    //Returns the array with the newly added boolean
    return $checks;
    }
    add_filter(‘eav_custom_modal_logic’,’home_page_disable_verifier’);

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author alexstandiford

    (@alexstandiford)

    Yep, this should be added to your theme’s functions.php file. Try using just bammcollective instead of www.bammcollective.com – perhaps that will resolve this issue.

    Also, technically is_home() applies to the blog archive and not the actual home page (although if your blog archive is the home page this would work). Also try changing is_home() in the code to is_front_page(). That may resolve the issue.

    hello!
    i tried the original code snippet and for some reason it doesnt work (anymore?). i wanted to test if i can only show the verification on shop pages.
    any update on this?
    thanks!

    Plugin Author alexstandiford

    (@alexstandiford)

    There hasn’t been any real changes to that section of the code for a while. Can you send me the snippet you’re using to show the verification?

    thanks for the fast reply!

     function home_page_disable_verifier($checks){
    	//Check if the current page is the home page
    	if(is_front_page()){
    		//If it is, add the check ID key, and set it to true.
    		$checks["is_front_page"] = true; // is_home_page can be whatever you want it to be. Make sure it's unique!
    	}
    	else{
    		//If not, add the check ID key, and set it to false.
    		$checks["is_front_page"] = false;
    	}
    	//Returns the array with the newly added boolean
    	return $checks;
    }
    add_filter('eav_custom_modal_logic','home_page_disable_verifier');

    is what i use, but either its on all pages (incl. frontpage) or not :S

    Plugin Author alexstandiford

    (@alexstandiford)

    Do you have a server or website cache?

    no caching on wordpress here! i also apllied this patch for testing:
    https://github.com/alexstandiford/easy-age-verifier/pull/95/files

    hi alex!
    sorry to bother again – did you find time to think what it could be? i am still kind of stuck here ??
    as said, no caching involved and i tried with a fresh browser as well..
    cheers
    patrick

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Home Page Verification Only’ is closed to new replies.