Author: alicoolpro

Confused ? How to show taxonomies terms of a posts into a wordpress page

Just add this code where you want to post categories with links

// your taxonomy name
$tax = 'post_tag';

// get the terms of taxonomy
$terms = get_terms( $tax, [
  'hide_empty' => false, // do not hide empty terms

// loop through all terms
foreach( $terms as $term ) {

  // if no entries attached to the term
  if( 0 == $term->count )
    // display only the term name
    echo '<h4>' . $term->name . '</h4>';

  // if term has more than 0 entries
  elseif( $term->count > 0 )
    // display link to the term archive
    echo '<h4><a href="'. get_term_link( $term ) .'">'. $term->name .'</a></h4>';


Dynamically populated post fields ( Gravity Forms )

There are two ways you might want to populate a drop down field. The first way is pre-selecting a drop down option when the form is displayed. The second way is dynamically populating the options that are available in a select (aka drop down) field. This walkthrough will teach you how to configure the latter. Continue reading “Dynamically populated post fields ( Gravity Forms )”