• Resolved dawnrae

    (@dawnrae)


    Thanks once again for such a great plugin. It has been invaluable in working on my site, but I do have a question.

    I have set up a loop and set up a limit of 2-4 items. What I’d like to do is have a WP query to find out how many items have actually been set up in the loop so that I can apply certain HTML based on that number.

    Suggestions?

    https://wordpress.org/plugins/custom-field-suite/

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    Hi, just count the loop array.

    $loop_field = CFS()->get( 'my_loop_field_name' );
    echo count( $loop_field );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Query loop to retrieve how many items?’ is closed to new replies.