php - How to create galleries for wordpress posts without plugin -


I want to create a gallery for my posts to work like this:

  1. I choose the pictures WordPress Post-New Page and Upload them
  2. Wordpress creates an array of uploaded images
  3. And finally I use that array and I put the gallery in my single.fp file

    Actually woocommerce is using the exact thing as you see in the picture ( Ed was not established English WordPress I)

    Any suggestions?

    screenshot of woocommerce gallery feature

    <

    • Enter a gallery in the tour post, div class = "post-text" itemprop = "text">

      You can use default gallery behavior for your needs

      • This will make a shortcode

          [Gallery IDs = "12,45,67,34"]    
      • Make it your post Override the default gallery shortcode function to not display in

          remove_shortcode ('gallery', 'gallery_short Check '); Add_shortcode ('Gallery', 'my_gallery'); Function my_gallery () {return ''; }    
      • Retrieve an array of images

          $ post_content = get_the_content (); Preg_match ('/ \ [gallery. * Id =. (. *). \] /', $ Post_content, $ id); If ($ id) {$ array_id = explosion (",", $ id [1]); }      

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -