WordPress.org

Ready to get started?Download WordPress

Forums

offset argument does not seem to work for get_terms? (1 post)

  1. racer x
    Member
    Posted 2 years ago #

    I was attempting to list the terms of a taxonomy in 2 columns alphabetically and I wanted to offset the the second column by half of the total number of terms found.

    $args = array(
    'orderby' => 'name',
    'show_count' => 1,
    'hide_empty' => false
    'offset' => ceil( $count_terms / 2 ) // I even hard coded this to test
    );
    $terms = get_terms( 'my_taxonomy_name', $args );

    This did not work for me? I found a workaround, but I was just curious to see if there was a known issue or a mistake in something I did?

    (BTW - Yes, I know 2 column lists can be done with CSS floats but that lists them left-right, left-right, etc. not vertically in col 1 and then continued vertically in col 2.)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags