• Resolved wesmed

    (@wesmed)


    Hello, I am currently using Ultimate Member for managing two user types. I have set up two separate user profile forms, each containing ~15 custom questions/fields. I have added the custom fields to each member directory, but on the front end of the site, the dropdown filters are displayed horizontally, and I would like for them to be displayed vertically- like a sidebar.

    Because each member directory has so many filters, they span across the screen to the point where they are cut off on the right side of the page and are no longer visible. I think this is a CSS issue?? How do I adjust the filters so that they are displayed vertically on the side of the page (like most websites)?

    NOTE: I am very new to websites and still learning (a lot!), so breaking it down would be GREATLY appreciated.

Viewing 15 replies - 31 through 45 (of 52 total)
  • Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    I just checked. It’s not a theme conflict. I’ve been double checking all my settings for about 3+ hours now and still can’t figure this out. I’m not sure what exactly to do at this point.

    @wesmed

    Enable PHP error logging if the debug will give some more info about this issue.

    Read this guide: “How to enable debug logging”

    https://docs.ultimatemember.com/article/1751-enable-debug-logging

    You will probably get a PHP log file with notices and some errors in this file when you do the tests: /wp-content/debug.log

    Post the content of this file here in the Forum and we can give you the PHP error explanation. For best formatting use the CODE format.

    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    Firstly, thank you again for your persistence with this issue. I fixed the issue and (this is slightly embarrassing) the width of my text module that I pasted my profile shortcode was set to a limiting height. Also, the module had a conditional visibility setting that wasn’t set to the corresponding user.

    Throughout this troubleshooting process, I have come across another issue regarding the member profiles. In the member directory settings, I have selected several taglines to display on the users’ profile cards, but the taglines that I need to display are from custom profile fields. The issue is that the taglines don’t have the ability to be labeled to indicate what exactly they are referring to.

    Here’s an example of the issue: one of the custom profile fields asks “What type(s) of agricultural land are you looking for? Check all that apply”, and the following options are:

    1. Fallow Land with Irrigation
    2. Fallow Land without Lrrigation
    3. Farm
    4. Orchard
    5. Pasture
    6. Ranch
    7. Rangeland

    However, say the user chose options #1, #5, and #6, when this specific tagline is displayed, it just says Fallow Land with Irrigation, Pasture, Ranch. This tagline (or rather the information from this profile field) is critical for profiles to display, but without a label, it’s confusing info to have as a tagline. I’m trying to figure out how to make it simply say “Desired Land Type: Fallow Land with Irrigation, Pasture, Ranch”. Pretty much all of my taglines have this issue of lacking context.

    How do I add labels to the profile card taglines so that they explain what the tagline info is referring to?

    @wesmed

    Now you must customize members-grid.php.
    Copy the file from UM template files to your theme as in this guide.

    https://docs.ultimatemember.com/article/1516-templates-map

    Next step is to add your desired text for the meta_key (replace my multi__key) of the multi select field like this at line 99:

    <?php if( $key == 'multi__key' ) echo 'Desired Land Type: '; ?><code>user['<?php echo $key; ?>']</code>

    For additional tag fields use the same code and replace meta_keys and your text.

    Thread Starter wesmed

    (@wesmed)

    Thanks so much @missveronicatv

    Just a couple of clarifying questions:

    Q1: Does our line 99 look the same? Line 99 of my members-grid.php file reads: line99 <code><code>user['<?php echo $key; ?>'</code>]</code></code>

    To my understanding, the modifications should reflect to code below

    line99 <?php if( $key == 'What type(s) of agricultural land are you looking for? Check all that apply' ) echo 'Desired Land Type: '; ?>                                                         
    
    line100 user['<?php echo $key; ?>]

    Q2:What exactly do the <code> pieces mean in your previous example:<code>user['<?php echo $key; ?>']</code>

    Q3:When defining the$key, does it need the be the filter meta (What type(s) of agricultural land are you looking for? Check all that apply), or the profile field meta_key (which is LS_property_type)

    Thank you!

    • This reply was modified 1 year, 9 months ago by wesmed.
    • This reply was modified 1 year, 9 months ago by wesmed.
    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    Not sure why my code above won’t display correctly. Line 99 in my members-grid.php file reads user['<?php echo $key; ?>'] but the code above is generating <code> in place of the {{{ – which I think answers my second question above.

    Also, does the example you provided above able to be used as a snippet, instead of editing the template file?

    @wesmed

    yes: {{{ translates to code
    No you can’t use a code snippet.

    Line 91 <code>foreach ( $tagline_fields as $key ) {` is creating a loop for each tagline field

    $key is the meta_key for each tagline field

    line 99 and user['<?php echo $key; ?>'] is your selected dropdown text.

    <?php if( $key == 'multi__key' ) echo 'Desired Land Type: '; ?> is your new label.
    multi__key is the dropdown meta_key name.
    echo 'Desired Land Type: '; will write your label text.

    This loop is including all lines until 103.

    For multiple new labels add each meta_key and label

    	<?php if( $key == 'multi__key_1' ) echo 'Desired Land Type: '; 
    		  if( $key == 'multi__key_2' ) echo 'Label text 2: ';?><code>user['<?php echo $key; ?>']</code>
    • This reply was modified 1 year, 9 months ago by missveronica.
    • This reply was modified 1 year, 9 months ago by missveronica.
    • This reply was modified 1 year, 9 months ago by missveronica.
    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    I appreciate the additional context. I think I follow. I added the following to line 99 in the members-grid.php file but it’s still not reflecting anything on the front end.

    <?php if( $key == 'What type(s) of agricultural land are you looking for? Check all that apply' ) echo 'Desired Land Type: '; ?>
                                            <code>user['<?php echo $key; ?>']</code>

    • This reply was modified 1 year, 9 months ago by wesmed.

    @wesmed

    No $key is the Meta Key name
    which you will find in the multi select modal in UM Forms Designer
    left column second item.

    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    Thank you for clarifying that. I inserted the meta_key for the corresponding field, but it never generated a label for the tagline. I also tried using other taglines and meta_keys, double checked all capitalization and punctuation – but still no labels. Any thoughts?

    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    I’ve been trying a different variations to exhaust all my options, but no matter what changes I make, the changes are reflected anywhere on my front end. The members-grid.php template appears in the Override Template tab in my UM Settings.

    I tried renaming the template file (members-grid-labels.php) to see if UM wasn’t recognizing the new template. Changing the name just made UM unable to recognize the new template and it disappeared from the Override Template tab in Settings.

    I also checked for any PHP errors, but none were associated with this particular issue. Below is my current modification. Are there other lines that I need to edit besides 99?

    <?php if( $LS_property_type == 'What type(s) of agricultural land are you looking for? Check all that apply' ) echo 'Desired Land Type: '; ?>
    <code>user['<?php echo $key; ?>']</code>

    @wesmed

    You can try this code:

    <?php if( $key == 'LS_property_type' ) echo 'Desired Land Type: '; ?>
    <code>user['<?php echo $key; ?>']</code>
    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    I tried that originally but that doesn’t add the label

    @wesmed

    Yes, now I understand your issue.

    There is a bug in UM 2.6.3 and if you can see the custom template in the UM Settings verification page your custom template is in the wrong directory.

    This issue will be fixed in the next version of UM.

    https://github.com/ultimatemember/ultimatemember/issues/1214

    Your custom template file members-grid.php must be in the ultimate-member folder and not in ultimate-member/templates folder as you have now.

    Move the file to the folder ultimate-member.
    This is the correct custom folder:

    
    locate_template: ultimate-member/members-grid.php
    locate_template: ultimate-member/members-list.php
    locate_template: ultimate-member/members-header.php
    locate_template: ultimate-member/members-pagination.php

    Note that you must keep the other custom template file members.php in the ultimate-member/templates folder.

    Thread Starter wesmed

    (@wesmed)

    @missveronicatv

    Well this makes more sense (and I feel a lot less crazy). Thanks for pointing this out. I moved the members-grid.php file to the following path: wp-content/themes/{active_theme}/ultimate-member/, but it still doesn’t reflect any changes to the tagline labels.

Viewing 15 replies - 31 through 45 (of 52 total)
  • The topic ‘How to edit CSS for Ultimate Member directory filters’ is closed to new replies.