Remove Street Address from Add Listing page

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 8 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #55078

    Dylan
    Expired Member
    Post count: 40

    Hello,

    We would like to remove the street address from the Add Listing page, so the user cannot change the address when editing the listing. I do not see an ‘admin only’ type of option for the street address (which of course includes the city, region, zip).

    What is the best way to prevent the street address from appearing on the edit listing page, other than trying to hide it with CSS (an ugly proposition, since each of the sub-fields don’t all have a unique class or ID assigned to them)?

    Thanks.

    #55207

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    You can easily hide with css, however you’ll need a new body class on the edit listing page.

    
    
    add_filter('body_class','edit_body_class');
    
    function edit_body_class($classes = '') {
    
    		if(isset($_GET['pid'])){$classes[] = 'edit-listing';
         
        }return $classes;
    		}

    Than the CSS:

    
    
    .edit-listing #geodir_post_address_row {
        display: none;
    }

    Thanks

    #55354

    Dylan
    Expired Member
    Post count: 40

    Yes, I knew hiding with CSS was an option, and have done that.

    Thanks for your help.

    #55409

    Paolo
    Site Admin
    Post count: 31206

    You are welcome 🙂

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket