Save multiple arrays in wp_options (2 posts)

  1. mehral
    Posted 2 years ago #

    Hello everyone, I wondering to create a menu page for Elastic slideshows to add some date for each image in Elastice slideshows, but the question is how can I save multiple arrays in “ wp_options” alike below images ( I made necessary function for increasing index in name value for creating a new array item )

    Images One : first datas that I have added to wp_options

    item one

    Images Two : and the second datas

    item two

    Images Three: this is what I want it.

  2. bcworkz
    Posted 2 years ago #

    I'm not sure what you're doing, but it's fairly clear what you want. For each image, do something like this:

    $image_data[] = array( 'h2'=> 'Main Title',
      'h3'=>'Sub Title',

    $image_data will eventually have all the data for the whole slideshow. If you need to add data to information already stored in a table, you should retrieve the existing data before adding to it. Then everything can overwrite the old data.

Topic Closed

This topic has been closed to new replies.

About this Topic