Support » Fixing WordPress » custom code to detect the URL /post and return the value

  • Resolved mmartinovich

    (@mmartinovich)


    I have this peace of code :

    add_filter('iphorm_element_value_product', 'mytheme_set_parameter');
    
    function mytheme_set_parameter($value)
    {
        // Check which post/URL we are on and return the values of the options we want ticked
        return array('Product1');
    }

    How can I find page URL I’m curently on and return that value?

    thx

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘custom code to detect the URL /post and return the value’ is closed to new replies.