• Resolved eraleks

    (@eraleks)


    I’ve made a local installation of wordpress to try and make custom post type.

    The idea is to make a custom post type where I can add all the theaters and performing spaces in Oslo (and in the end make the archive searchable and filterable after capacity, name or place).

    I’ve followed this tutorial. Pretty much doing exactly the same except adding more meta boxes (Capacity, Adress, URL and contact information.

    The problem is, when hitting publish only 1 of the metaboxes (kontaktinformasjon) gets saved. Everything I fill out in the other fields get erased and doesn’t show.

    You can download my plug-in files here.

    Hope anyone is able to help or point me to the right place / what to change compared to the tutorial to get more fields to save.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter eraleks

    (@eraleks)

    Found the mistake in a typo after hours of searching.

    Still I wonder what does the numbers in this piece of code do:

    add_action( 'save_post', 'add_lokaler_fields', 10, 2 );

    10 = when to run 10 is default higher the number later the action will run
    2 = variables your function deal with

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom post type meta box not saving’ is closed to new replies.