Remove Links to Categories

  • Eric
    Eric
    Newbie 7 points
    April 14, 2015 at 5:14 pm

    Running the latest real estate theme. Has been customized.

    Need some help!
    When viewing the listing the categories are displayed in a field as well as Keywords. I was able to remove the links on the keywords some time ago and do not know where I did that.
    I would like to remove the links on categories so that no on can click on them, or even just remove this field altogether.
    I have tried just about everything I could find searching these forums for hours… Adding jquery script… using [fields hide=””] nothing is working.

    I believe it can be done in the file class_white_label_themes.php ? or I could be wrong, as I have tried many things already in this one and nothing worked.


  • Josh
    Super Guru 13,875 points
    April 14, 2015 at 5:24 pm

    Hello Eric
    Try [FIELDS hide=”category”]

  • Eric
    Eric
    Newbie 7 points
    April 14, 2015 at 5:30 pm

    Hi Josh,

    Thanks for your reply. I have tried that. It doesn’t do anything. I even just tried it again now.. and there was not change. The field is still there… I even tried using show and show only the other fields, but that did not work either, as some of the fields ended up showing without data…

    It seems like the easiest is just to go in the template somewhere and remove the link tag from somewhere… just cannot locate it.


  • Josh
    Super Guru 13,875 points
    April 14, 2015 at 5:51 pm

    Currently the shortcode in the content-single-listing-realestate.php is [FIELDS hide=”map”] replace it with
    [code title=””][FIELDS hide=”map|category”][/code]
    or use this in Design Setup >Custom Meta Data >Footer Styles
    [code title=””]
    <script>
    jQuery (“#TableCustomFieldsBig tbody tr:nth-child(6)”).remove()
    </script>
    [/code]

  • Eric
    Eric
    Newbie 7 points
    April 14, 2015 at 6:04 pm

    Not using the content-single-listing-realestate.php , just using the custom layout, but I have [FIELDS hide=”category”] in there right now.

    I also just tried your code in the footer styles.
    🙁 Nothing is working.

    Here’s a link to a listing. Both solutions you posted are currently still there and not working. https://whitetaillandsales.com/listing/91-78-acres-big-timber-hunting-farm/
    You can see the category field is still there. (We have named it Type or Use)
    would be nice if we could just remove the links from the categories (we do not want people to access these pages.) but thought it would be easier to just remove the field… guess not. Any idea what could be wrong? or where to go in the theme to remove the link to the cat?


  • Josh
    Super Guru 13,875 points
    April 14, 2015 at 6:15 pm

    Try this
    [code title=””]
    <script>
    jQuery (“#TableCustomFieldsBig tbody tr:nth-child(10)”).remove()
    </script>
    [/code]

    This reply was awarded the best answer by the topic poster.
  • Eric
    Eric
    Newbie 7 points
    April 14, 2015 at 6:31 pm

    Ah, yes!! got it to work!! It didn’t work initially, but I figured out the field was actually 14 instead of 10, and that did it!

    Awesome, thanks so much for your assistance. Its very much appreciated!


  • Josh
    Super Guru 13,875 points
    April 14, 2015 at 6:52 pm

    Your welcome Eric.Glad i could help 🙂

  • Jonathan
    Jonathan
    Newbie 6 points
    April 25, 2015 at 7:29 am

    I used this script as well, but had a problem: I had an optional field before those I wanted to remove. So, I modified the script to count from the end, using nth-last-child.


  • Josh
    Super Guru 13,875 points
    April 25, 2015 at 9:58 am

    Thanks for sharing Jonathan

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

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes