Okay
  Public Ticket #1423925
Enable default custom fields
Closed

Comments

  • carlosbonassi started the conversation

    Hi,

    How can I enable default custom fields on Bridge Theme? I need some additional fields in some parts of the site.

    I'm waiting for your answer

    Thanks!

  •  460
    Qode replied

    Hi there,

    thanks for choosing our theme!

    To enable custom fields, just add code below at the end of functions.php file from theme folder / functions.php file or from WP admin > Appearance > Editor > Theme Functions (functions.php)

    remove_action('do_meta_boxes', 'removeDefaultCustomFields');

    It is good practice to use child theme to create these kind of changes because in this way changes will be permanent. If you continue to use main Bridge theme changes will be lost on next theme update.
    For child theme code should be add like this inside functions.php file:


    add_action( 'after_setup_theme', 'add_parent_theme_metaboxes', 10 );
    function add_parent_theme_metaboxes() {
    remove_action('do_meta_boxes', 'removeDefaultCustomFields');
    }

    You can read more about theme in our documentation http://bridge.qodeinteractive.com/documentation/1-whats-in-the-box/ .

    If you need more help, just let us know.
    Thanks.

    The new and improved Online Bridge Documentation is live. Check it out now - http://bridge.qodeinteractive.com/

    QodeThemes Support Specialist

  • roxanita06 replied

    Hi ! 

    I also need to access to custom fields for the Events posts in order to set up an automated plugin for import events...  

    I used the code : 

    add_action( 'after_setup_theme', 'add_parent_theme_metaboxes', 10 ); 
    function add_parent_theme_metaboxes() {
        remove_action('do_meta_boxes','removeDefaultCustomFields');
    }

    It works well for the regular posts but the box is still missing for Events. 

    Thanks for your help! 

    Roxane

    Attached files:  Capture-d’écran-2018-05-16-à-13.01.16.jpg
      Capture-d’écran-2018-05-16-à-13.00.28.jpg

  • roxanita06 replied

    Finally! I found it adding 'custom-fields' to 'supports' => array

    in /wp-content/plugins/qode-music/post-types/events/events-register.php

    Thanks!

  •  1,117
    Qode replied

    Ok, thanks for your update. Glad you managed to resolve this in the meantime.

    All the best,

    The new and improved Online Bridge Documentation is live. Check it out now - LINK

    Also check our articles with useful tips and suggestions

    Best Regards,

    Qode