get_terms that have custom sticky field checked

OK, got it <?php $types = get_terms( ‘tvr_amenity’, array( ‘parent’ => ‘0’, ‘hide_empty’ => 1 ) ); foreach( $types as $type ) : $myname = trim($type->name); $meta = get_option(‘amenity_sticky’); if (empty($meta)) $meta = array(); if (!is_array($meta)) $meta = (array) $meta; $meta = isset($meta[$type->term_id]) ? $meta[$type->term_id] : array(); $value = $meta[‘is_sticky’]; if(!$value) continue; /* skip term … Read more

strtotime and custom field value

The following works correctly for me, returning “December 9, 2013” in my case. $Due=”20131209″; echo date_i18n( get_option( ‘date_format’ ), strtotime( $Due ) ); So either … $Due is not what you think it is Or you have set a custom date format to an incorrect value

How to create a Custom Meta Box with Name/Value Admin User Input Fields?

To help you understanding how forms work: They add to the $_POST array by a form fields name argument. <input type=”text” name=”foo” value=”Fooo!” /> would produce $_POST (array) => foo => Fooo! while <input type=”text” name=”foo[bar]” value=”Bar.” /> <input type=”text” name=”foo[baz]” value=”Baz.” /> would produce $_POST (array) => foo => (array) => bar => Bar. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)