Hello my fellow WP Developers,
I am running into a wall with a custom theme I am creating for a personal project.
Background
It's a website that will be used by users that collect a specific type of figures. This site will basically be a big data dump of all the figures ever released in this line. And because these figures are so rare to find I wanted to make a site where collectors can compile their own "I own this" list and what the current second hand value of the figure is and if there currently is a store that sells the figure.
Current Challenge
What I am trying to accomplish right now is the following:
I have added a custom post type for the figures (Called 'wdcc'). This post type has 3 taxonomies
- Series
- Edition
- Store
What I currently want is that I can add "Stores" through normal means (add new etc.). Now I've created a custom meta box which I want to use to add stores that currently sell the figure. So I can choose the store from a dropdown (The select is populated with a foreach loop) and input the selling price in a input field. My idea was to use Datatable scripts and currently implemented this one Datatables.
Problem
I got the meta box semi working. There are still some parts that not entirely work as I want them too but I can interact with the meta box. It's more that I can't seem to figure out how to save the meta data I added through jQuery/Javascript.
I've been browsing through the codex like crazy at functions like save_post
and update_post_meta
.
Searched google for hints and tips but so far I can't seem to figure this out.
Code
I use X Theme as my parent theme and have x-child as the active theme. I basically use their code style and some functions as they do and edit, add, update where needed.
Extra
If more info is needed. Please feel free to ask.
Many thanks