BBPress Steven Zahm : Replies Created

Forum Replies Created

Viewing 10 posts - 5,521 through 5,530 (of 15,332 total)
  • Author
    Posts
  • in reply to: How to NOT display empty fields? #380367
    Steven Zahm
    Keymaster

    @ Omar Brenes

    re: so we would have to delete them in each individual entry?

    Yes, unfortunately so.

    That said, there might be an alternative, try this…

    Install the Code Snippets plugin.

    Add a new snippet with the following code:

    add_filter( 'cn_entry_output_meta_key', 'cn_skip_empty_entry_meta_value', 10, 4 );
    
    function cn_skip_empty_entry_meta_value( $html, $atts, $key, $value ) {
    
        if ( 0 < strlen( $value ) ) return '';
    
        return $html;
    }
    

    Save and Activate the snippet.

    This is untested, but if it works, it should “skip” rendering any meta keys where the value is empty.

    Hope this helps, let me know.

    in reply to: Customize Search Input #380366
    Steven Zahm
    Keymaster

    @ John

    You can drop a file named search.php into any of these folders:

    • ../wp-content/theme/{child-theme}/connections-templates/{slug}/
    • ../wp-content/theme/{parent-theme}/connections-templates/{slug}/
    • ../wp-content/connections-templates/{slug}/
    • ../wp-content/plugins/template-folder/

    The {slug} would be the template’s slug. For example, excerpt-plus.

    Which folder really depends, but I suggest the last location in the list above.

    Hope that helps!, let me know.

    ps. More details can be found in this QuickTip on custom template override files.

    in reply to: User Registration with Gravity Forms #380364
    Steven Zahm
    Keymaster

    @ ottomek

    **re: Is it an option to not use the GF User Registration add-on? And not let the person using form create a WP user? **

    Yes, if you wish to create a user manually, you do not need to use the GF User Registration add-on. The entry will still be created in the directory.

    in reply to: Add custom field not editable by Members #380363
    Steven Zahm
    Keymaster

    @ ottomek

    Hmmm… there is actually no way to do this presently. If you change the code snippet to this:

    // Register the metabox and field.
    add_action( 'cn_metabox', 'cn_register_custom_metabox_and_date_field' );
    
    function cn_register_custom_metabox_and_date_field() {
    
        $atts = array(
            'title'    => 'Expiration Date',         // Change this to a name which applies to your project.
            'id'       => 'expiration_date_metabox', // Change this so it is unique to you project.
            'context'  => 'normal',
            'priority' => 'core',
            'fields'   => array(
                array(
                    'name'       => 'Date',            // Change this field name to something which applies to you project.
                    'show_label' => TRUE,              // Whether or not to display the 'name'. Changing it to false will suppress the name.
                    'id'         => 'expiration_date', // Change this so it is unique to you project. Each field id MUST be unique.
                    'type'       => 'datepicker',      // This is the field type being added.
                    'readonly'   => is_admin() && ! current_user_can( 'manage_options' ) ? TRUE : FALSE
                ),
            ),
        );
    
        cnMetaboxAPI::add( $atts );
    }
    

    And make these changes to Connections ../includes/class.metabox-api.php file, it will work the way you want. I’ve already made the change and it’ll included in the next update.

    Hope that helps!

    in reply to: How to NOT display empty fields? #380361
    Steven Zahm
    Keymaster

    @ Omar Brenes

    For those… you need to edit the entry and remove those custom fields name values and then save the updated entry. If you have nothing to enter for the custom field values, you should add them to the entry. The reason those are being displayed is because the names have been entered and therefore they are not “empty”

    Hope that helps!

    in reply to: Search functionality #380322
    Steven Zahm
    Keymaster

    @ Heath

    I have not heard back so I thought I’d check in… Did you have a chance to verify if the search results are more to your liking?

    Steven Zahm
    Keymaster

    @ Carolin

    re: is it possible to turn this into a multiple selector rather than a single selector drop-down?

    This, well, is possible but much more difficult because it will be both the widget and content block because both are designed to show the value, not multiple. Perhaps using the Hobbies extension instead would be better since it is designed to show multiple options and values.

    You could “swap out” the hobby options with your education options using a filter like so:

    add_filter( 'cn_education_level_options', 'cn_change_hobby_to_edu_lvl' ) );
    
    function cn_change_hobby_to_edu_lvl( $options ) {
    
        $options = array(
                'Education Choice One',
                'Education Choice Two',
                'Education Choice Three',
                'Education Choice Four',
                'Education Choice Five',
            );
    
        return $options;
    }
    

    Hope that helps!

    in reply to: Filter listings by certain field #380318
    Steven Zahm
    Keymaster

    @ John

    Great to hear it is working for you! Sorry about not getting that syntax correct! The meta_query support is not a feature even I use that often but is soooo very handy when you need it.

    If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!

    https://wordpress.org/support/view/plugin-reviews/connections

    in reply to: Default entry & remove fieldsets #380317
    Steven Zahm
    Keymaster

    @ ottomek

    re: I have several more fieldsets that the client wants removed but I don’t think cn_remove_metaboxes snippet you gave me is going to work. What kind of snippet do I add to remove these completely from the Member Entry/Directory edit area?

    Correct using the cn_remove_metaboxes snippet will not work in this case. What you have to do is hide those fields using CSS.

    in reply to: Make specific Address field active #380316
    Steven Zahm
    Keymaster

    @ Raymond

    re: Let me know how I can help with adding the district field!

    Sure thing! I expect to have the fields added sometime this week yet.

Viewing 10 posts - 5,521 through 5,530 (of 15,332 total)