fbpx
2 voices
1 reply
  • Author
    Posts
  • #3197
    Syeda Sundas
    Participant
    The Author
    Up
    0
    Down

    Salam,

    In this tut,  PSD to WP Theme Conversion “FAQ section”. Bootstrap accordion takes id for each, how can we loop through each id? I mean when I get details from the WordPress dashboard, it will loop through with the same ID for each.

    #3205
    Up
    -1
    Down

    Every post has an ID field, you can use get_the_ID() function to get the ID of every post. Or you can introduce your own ID variable and like $i = 1; and the increment by 1 $i++ before the while loop ends and use $i in ID attribute.

You must be logged in to reply to this topic.

small_c_popup.png

have a feedback?

Let us know how we can improve further.