• Resolved TanaseILiviu

    (@tanaseiliviu)


    Hello. I want to add my custom fields on user submitted posts… when guests posts articles to complete my fields too and datas save in database…

    i exported to php my fields and are looking like this :

    if(function_exists(“register_field_group”))
    {
    register_field_group(array (
    ‘id’ => ‘acf_locatie’,
    ‘title’ => ‘Locatie’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_5692a6651b7c9’,
    ‘label’ => ‘Tipul de anunt’,
    ‘name’ => ‘tipuldeanunt’,
    ‘type’ => ‘select’,
    ‘instructions’ => ‘Aici selectati ce tip de anunt folositi :

    -Doriti sa cautati un loc de munca repede si sigur ? Bifati “caut loc de munca”

    -Aveti nevoie de personal , puteti oferi un loc de munca , ati vazut un anunt ce ar putea interesa pe cineva? Bifati “ofer loc de munca”

    -Aveti nevoie de un zugrav, un zidar, un electrician , o bona, un meditator , o persoana sa va plimbe cainele sau orice altceva? Bifati “caut servicii”

    -Sunteti specializat intr-un domeniu si nu aveti de lucru deoarece nu sunteti cunoscut? Bifati “ofer servicii”‘,
    ‘required’ => 1,
    ‘choices’ => array (
    ‘Caut loc de munca’ => ‘Caut loc de munca’,
    ‘Ofer loc de munca’ => ‘Ofer loc de munca’,
    ‘Caut servicii’ => ‘Caut servicii’,
    ‘Ofer servicii’ => ‘Ofer servicii’,
    ),
    ‘default_value’ => ”,
    ‘allow_null’ => 1,
    ‘multiple’ => 0,
    ),
    array (
    ‘key’ => ‘field_566594550f5c6’,
    ‘label’ => ‘Locatie’,
    ‘name’ => ‘locatie’,
    ‘type’ => ‘select’,
    ‘instructions’ => ‘Selectati locatia’,
    ‘required’ => 1,
    ‘choices’ => array (
    ‘Alba’ => ‘Alba’,
    ‘Arad’ => ‘Arad’,
    ‘Arges’ => ‘Arges’,
    ‘Bacau’ => ‘Bacau’,
    ‘Bihor’ => ‘Bihor’,
    ‘Bistrita-Nasaud’ => ‘Bistrita-Nasaud’,
    ‘Botosani’ => ‘Botosani’,
    ‘Braila’ => ‘Braila’,
    ‘Brasov’ => ‘Brasov’,
    ‘Bucuresti-Ilfov’ => ‘Bucuresti-Ilfov’,
    ‘Calarasi’ => ‘Calarasi’,
    ‘Caras-Severin’ => ‘Caras-Severin’,
    ‘Cluj’ => ‘Cluj’,
    ‘Constanta’ => ‘Constanta’,
    ‘Covasna’ => ‘Covasna’,
    ‘Dambovita’ => ‘Dambovita’,
    ‘Dolj’ => ‘Dolj’,
    ‘Galati’ => ‘Galati’,
    ‘Giurgiu’ => ‘Giurgiu’,
    ‘Gorj’ => ‘Gorj’,
    ‘Harghita’ => ‘Harghita’,
    ‘Hunedoara’ => ‘Hunedoara’,
    ‘Ialomita’ => ‘Ialomita’,
    ‘Iasi’ => ‘Iasi’,
    ‘Maramures’ => ‘Maramures’,
    ‘Mehedinti’ => ‘Mehedinti’,
    ‘Mures’ => ‘Mures’,
    ‘Neamt’ => ‘Neamt’,
    ‘Olt’ => ‘Olt’,
    ‘Prahova’ => ‘Prahova’,
    ‘Salaj’ => ‘Salaj’,
    ‘Satu Mare’ => ‘Satu Mare’,
    ‘Sibiu’ => ‘Sibiu’,
    ‘Suceava’ => ‘Suceava’,
    ‘Teleorman’ => ‘Teleorman’,
    ‘Timis’ => ‘Timis’,
    ‘Tulcea’ => ‘Tulcea’,
    ‘Valcea’ => ‘Valcea’,
    ‘Vaslui’ => ‘Vaslui’,
    ),
    ‘default_value’ => ”,
    ‘allow_null’ => 1,
    ‘multiple’ => 0,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘user_type’,
    ‘operator’ => ‘!=’,
    ‘value’ => ‘subscriber’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘default’,
    ‘hide_on_screen’ => array (
    0 => ‘permalink’,
    1 => ‘excerpt’,
    2 => ‘custom_fields’,
    3 => ‘discussion’,
    4 => ‘comments’,
    5 => ‘revisions’,
    6 => ‘slug’,
    7 => ‘format’,
    8 => ‘featured_image’,
    9 => ‘tags’,
    10 => ‘send-trackbacks’,
    ),
    ),
    ‘menu_order’ => 0,
    ));
    }

    How can i modify this to appear on my user submitted posts? Please help me..i’m searching from 2 days and used all custom fields plugins…and i tried anything… please help me..

    I need them to save in database because it’s a criteria for my search..how you can see here
    they are searching articles from next criterias :

    location
    typeofarticle
    category

    Sorry for my bad english , i hope you understand what i want to say.

    I want these custom fields : to appear here

    https://wordpress.org/plugins/user-submitted-posts/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Glad to help with any existing plugin functionality, which does not include support for Custom Fields. The Pro version, however, can do unlimited Custom Fields:

    https://plugin-planet.com/usp-pro/

    Let me know if any questions about existing functionality for the free version of USP. And if you have any questions about USP Pro, feel free to contact via the contact form at the bottom of the page linked above. Thank you.

    Hello,

    I’m glad that there is a pro version that supports unlimited custom fields, but I have question, is there a custom field for uploading a video?

    Plugin Author Jeff Starr

    (@specialk)

    Yes, you can upload video or any other file type that is supported by WordPress. For more infos, please contact me directly:

    https://perishablepress.com/contact/

    Because the forums here at WordPress.org are for free versions of plugins only. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add my custom fields to user submitted posts?’ is closed to new replies.