Dating Theme Edit/Remove Genders


  • Robert
    Newbie
     
    44 points

    Hello,

    I saw other posts regarding this but for some reason I can not get it to work on my end.

    Im trying to remove 4-8 on the list of seeking and genders.
    I used these codes in the custom CSS to no avail.

    [code title=”remove”]
    <script>
    jQuery(“#form_dagender option[value=’3′]”).remove();
    jQuery(“#form_dagender option[value=’4′]”).remove();
    jQuery(“#form_dagender option[value=’5′]”).remove();
    jQuery(“#form_dagender option[value=’6′]”).remove();
    jQuery(“#form_dagender option[value=’7′]”).remove();
    jQuery(“#form_dagender option[value=’8′]”).remove();
    jQuery(“#form_daseeking–1 option[value=’3′]”).remove();
    jQuery(“#form_daseeking–1 option[value=’4′]”).remove();
    jQuery(“#form_daseeking–1 option[value=’5′]”).remove();
    jQuery(“#form_daseeking–1 option[value=’6′]”).remove();
    jQuery(“#form_daseeking–1 option[value=’7′]”).remove();
    jQuery(“#form_daseeking option[value=’8′]”).remove();
    </script>
    [/code]


    JamesD
    JamesD
    Senior Member
     
    323 points

    Hello Robert,

    You can try something like this:

    
    <script>
    jQuery('[name="daseeking--1"] option:gt(2)').remove();
    </script>
    

    Place this with your custom javascript or in “General Setup > Custom CSS/Javascript > Footer Styles”

    Note: In this example I’m using the default theme element name “daseeking–1”, so you may need to change this to the correct name of the select dropdown if it’s not the same as on your theme.

    Also, the “option:gt(2)'” portion is telling jquery to only grab option items that have an index value greater than 2. Changing this number will change the items it removes.

    Please provide a URL if this doesn’t work.

    This reply was awarded the best answer by the topic poster.


    Robert
    Newbie
     
    44 points

    Thanks for the quick response,
    It worked thank you 😀


    JamesD
    JamesD
    Senior Member
     
    323 points

    Glad it helped Robert, you’re welcome.

    Thanks for updating the post.


    Josh
    Josh
    Super Guru
     
    12,525 points

    Hello Robert.
    Using css would be the best option.Script will slow your site

    .fg-daseeking select option:nth-child(3),option:nth-child(4) {
    display:none;
    }



    Robert
    Newbie
     
    44 points

    Hi,

    How do I remove the genders from the list after signing up and when making the profile?

    Thanks


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.