After creating news section which takes first post of every topic and turns it into a WordPress post I need something more complicated – a section of articles. This requires taking the first post of a topic and appending the remaining posts to the first one – just like chapters in the article. And actually this is something that I’ve already achieved. I’m using a second query to get posts from a topic, and by using variables for topic IDs and post IDs I can even specify which posts will be imported and appended. The problem is I need to be able to add, edit or remove topics and posts IDs from the query. After using settings API in the news section I thought that it wouldn’t be too difficult to use it here, but sadly it is. And this is where I need help.
What I need is an options page that will list all the topics and posts IDs, and let me add, edit or delete these settings and will update the list. I tried to use the settings API, to add a pair of forms every time an option is added, but I’m not even close to what I need. I’m not even sure if storing a multidimentional array ( article# => array( topic_id => ‘value’, posts_ids => ‘values’ ) ) as an option is a good idea. I’ll be grateful for any ideas.
- The topic ‘Dynamically adding forms and options’ is closed to new replies.