• Resolved Roman77

    (@roman77)


    Local Test Site

    Hello, can you please advise what would be the correct code, can not seems to get it to work.

    In my Real Estate Houzez theme, I have a Parent feature list with Sub Features underneath, Im trying to change the Import word from “Pool” to “HOA Community Pool”, I thought just changing the display name would work but the import adds a new subname with slug#2 instead, I thing the php code should work, below is what I’m using

    The import comes in like this:
    CommunityFeatures[1]/item_3[1]
    CommunityFeatures[1]/item_3[2]
    CommunityFeatures[1]/item_3[3]

    etc, etc, Im trying to tell the code that under Community Features parent, if “Pool” gets imported, display ” HOA Community Pool” instead, I do not know if it will come in under line 1,2 or 3, its random

    <?php
    function my_map_data( $data ) {
    $map = array(
    ‘CommunityFeatures[1]/item_3[Pool]’ => ‘HOA Community Pool’,

    );
    return ( array_key_exists( $data, $map ) ) ? $map[ $data ] : $data;

    }
    ?>

    Thank You

Viewing 1 replies (of 1 total)
  • Thread Starter Roman77

    (@roman77)

    Resolved, on CSV file, I just renamed that subcategory word with the one I want, can be done with a script within the CSV software. I was adding the function on theme function file and seems that does not work..

    • This reply was modified 1 year, 11 months ago by Roman77.
Viewing 1 replies (of 1 total)
  • The topic ‘Mapping via Functions Correct Code’ is closed to new replies.