Gravity prerender taxonomy [closed]

Scoured the web and modified a snippet, in case anybody is interested: <?php add_filter(“gform_pre_render”, “gform_prepopluate_populate_books”); add_filter(“gform_admin_pre_render”, “gform_prepopluate_populate_books”); function gform_prepopluate_populate_books($form){ //Grab all Terms Associated with a Specific Taxonomy; global $post; $taxonomy = ‘genres’; $formid = 5; $fieldid = 14; if($form[“id”] != $formid) return $form; $terms = get_terms($taxonomy, ‘hide_empty=0&orderby=none’); //Creating drop down item array. $items = array(); … Read more

Avoiding stripping of HTML in Custom Taxonomy Meta Field

you can use esc_attr function save_taxonomy_custom_meta_bandcamp_embed_music( $term_id ) { if ( isset( $_POST[‘term_meta’] ) ) { $t_id = $term_id; $term_meta = get_option( “taxonomy_$t_id” ); $cat_keys = array_keys( $_POST[‘term_meta’] ); foreach ( $cat_keys as $key ) { if ( isset ( $_POST[‘term_meta’][$key] ) ) { $term_meta[$key] = esc_attr( $_POST[‘term_meta’][$key] ); // encoded text with HTML entities … Read more

Listing all selected terms for custom taxonomies on a post

$args = array( ‘post_type’ => ‘inspirations’, ‘posts_per_page’ => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); $collections=””; foreach ( (array) wp_get_post_terms( get_the_ID(), ‘collections’) as $collection ) { if ( empty($collection->slug ) ) continue; $collections .= ‘ collection-‘ . sanitize_html_class($collection->slug, $collection->term_id); } echo ‘<div class=”inspirations-post ‘. $collections . ‘”>’; the_title(); … Read more

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