• hello, I have added a custom attribute called status, the values are available, sale pending, sold, etc.
    Is there a way to add a class name to each value? currently, there is only the one class:
    <span class=”property_status”>Available!</span>
    could you direct me to the file(s) that I can edit were I can add a span tag around the value and have the span get a class name added to it based on its slug…. and give an example of the code?
    I am familiar with editing the property overview file but I am not sure how I can add this extra code.

    <?php if( !empty( $property['status'] ) ): ?>
                    <span class="property_status"><?php echo $property['status']; ?></span>
                <?php endif; ?>

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    You could use draw_stats function with apply_filters('wpp::draw_stats::attributes', $property_stats, $property, $args);

    Regards.

    Thread Starter jpstudiodesigns

    (@jessicapschultz)

    Thank you so much for your help!
    I added the code to my child theme functions file but I do not see any change to the output. I am not a coder, am I supposed to add the code to the property overview file? and if so, how?
    or if it is to go in the functions file, do I need to modify your code? the attribute I want to add the feature to is called status

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    We do provide custom development if you are interested. Feel free to email us if you need something custom – https://www.usabilitydynamics.com/hire-us

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add class to custom attribute values’ is closed to new replies.