Jump to content

troshan

New Members
  • Posts

    5
  • Joined

  • Last visited

troshan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please refer the image when select the child category it shows "searchfilter?field_category_tid=5" but when I select the parent it shows nothing "searchfilter?field_category_tid=4" I know this can be solved by creating contextual filters or some sort of relationship setting. But I have no idea how to do it.
  2. Using the following guideline I managed to add my custom classes to selector. https://codex.wordpress.org/TinyMCE_Custom_Styles But Now I want to add a clear button to remove the classes How can I implement this?
  3. I'm using "simplehtmldom" to captured the elements. I want to capture the email address from the following the email is generating with javascript and It was decoded. So I know I can not capture the email. I noticed, I couldn't select the "output" or It's child element for some reasons. $myemail = $item->find ('#field_11 .output'); So I captured the whole div by following method $myemail = $item->find ('#field_11'); and which out puts the following result. I guess If I remove the <!-- I'll able to print the value. I was trying to trim the <!-- by follwing method but none of them work trim($myemail, "!--//"); trim(strip_tags($myemail), "!--//"); trim(htmlentities($myemail), "!--//"); I was trying to decode the result by following functions but none of them work (I guess using REGEX I can extract the email after decode) html_entity_decode htmlspecialchars_decode utf8_decode Could anyone help me to achieve what I want? Please ignore if any of my method distract you from providing a right solution.
  4. Im having issue with uloading following into heroku host as db.json located outside of the 'json-server' directory https://github.com/typicode/json-server/ How and where should I modify this script to move the db.json into 'json-server' dirctory
  5. Following code generate a select dropdown field $fields['shipping']['shipping_city'] = array( 'label' => __('City', 'woocommerce'), 'placeholder' => _x('', 'placeholder', 'woocommerce'), 'required' => true, 'clear' => true, 'type' => 'select', 'class' => array('own-css-name'), 'options' => array( 'New_York_City' => __('New York City', 'woocommerce' ), 'Chicago' => __('Chicago', 'woocommerce' ), 'Dallas' => __('Dallas', 'woocommerce' ) ) ); I want to get the "option =>" values from category array. I tried the following $categories = get_categories( $args ); foreach ($categories as $category) { $cityArray[] = "'".$category->slug."' => __('".$category->name."', 'woocommerce' )"; } $fields['shipping']['shipping_city2'] = array( 'label' => __('City', 'woocommerce'), 'placeholder' => _x('', 'placeholder', 'woocommerce'), 'required' => true, 'clear' => true, 'type' => 'select', 'class' => array('own-css-name'), 'options' => array(implode( ', ', $cityArray ) ) ); but It return the attached result
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.