• Resolved austriadesign

    (@austriadesign)


    Hi there,

    I don’t know why but custom fields are not shown anymore in frontend. In backend everything seems fine.

    This is what I added to /wp-content/plugins/awesome-support-custom-fields.php:

    // If this file is called directly, abort.
    if ( ! defined( ‘WPINC’ ) ) {
    die;
    }

    add_action( ‘plugins_loaded’, ‘wpas_user_custom_fields’ );
    /**
    * Register all custom fields after the plugin is safely loaded.
    */
    function wpas_user_custom_fields() {
    /* You can start adding your custom fields safely after this line */

    if ( function_exists( ‘wpas_add_custom_taxonomy’ ) ) {
    wpas_add_custom_taxonomy( ‘errorhandler’, array( ‘title’ => ‘Kategorie’, ‘label’ => ‘Auftrag’, ‘label_plural’ => ‘Kategorie’, ‘order’ => ‘3’ ) );
    }
    if ( function_exists( ‘wpas_add_custom_field’ ) ) {
    wpas_add_custom_field( ‘website’, array( ‘title’ => ‘Domain’, ‘label’ => ‘Website-URL*’, ‘label_plural’ => ‘Website’, ‘field_type’ => ‘url’, ‘placeholder’ => ‘https://’, ‘order’ => ‘1’, ‘required’ => true ) );
    }
    if ( function_exists( ‘wpas_add_custom_field’ ) ) {
    wpas_add_custom_field( ‘ip_adress’, array( ‘title’ => ‘IP-Adresse’, ‘label’ => ‘IP-Adresse’, ‘label_plural’ => ‘IP-Adresse’, ‘field_type’ => ‘text’, ‘placeholder’ => ‘www.wieistmeineip.at’, ‘order’ => ‘2’ ) );
    }

    /* Do NOT write anything after this line */
    }

    Can’t find errors 🙁

    Please help me

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, I am experiencing the same issue, as mentioned in another post – even the basic AWSP example of custom fields does not seem to work… anyone with a solution?

    My issue is also that I’d like to use specific session data (e.g., user info) and I would like to know which is the best hook for that, as plugins_loaded cannot see the user

    Thanks a lot

    Plugin Author awesomesupport

    (@awesomesupport)

    @austriadesign – I tested the two custom fields that were created with the wpas_add_custom_field function and that seem to work for me. The hook used is still plugins_loaded.

    So, as far as I can tell, the code seems fine.

    Maybe, just for a test, remove the if ( function_exists( conditional and see if that helps.

    Thanks.

    Plugin Author awesomesupport

    (@awesomesupport)

    Hello:

    Since we have not heard back from you on this issue we’ll assume its been resolved.

    Thanks for using Awesome Support!

    Hi, I solved my problems hooking the function to ‘after_setup_theme’ instead of ‘plugins_loaded’ – this probably depends on the theme you are using. Hope this helps!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom fields not shown’ is closed to new replies.