Support » Themes and Templates » Adding number of images of the media library in my templates

  • Hello

    I would like to display the number of images of the media library in my templates.
    Any idea to do it ?

    Regards

    JMB

Viewing 1 replies (of 1 total)
  • I believe there is a count function within wordpress…

    otherwise, you could to a loop such as (this is concept… i am not fluent enough in PHP to write it out:}

    $images_count=0 <– declares the integer as not having a value
    While there are more images{;
    $images_count++; <– increase ‘images’s value for each image not sure about the actual command for this in PHP
    } <– ends while loop :p

    print “there are” . $images_count . “images in the media library.”;

    sorry I can’t be more specific 🙁

Viewing 1 replies (of 1 total)
  • The topic ‘Adding number of images of the media library in my templates’ is closed to new replies.