[URL] change "listings" parameter to

Community Forums Forums Internationalization and Translations [URL] change "listings" parameter to

This topic is: not resolved

This topic contains 7 replies, has 7 voices, and was last updated by  seattlesavvy 1 year, 3 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #515

    thanhlm85
    Participant
    Post count: 10

    hi!

    I want to change “listings” parameter to may language

    how i can do ?

    http://demo.studiopress.com/agentpress/listings/1333-north-park-avenue

    thanks

    #1095

    David Decker
    Moderator
    Post count: 93

    Currently this is not possible with the current plugin version! The slug/rewrite rule is hard coded, so no chance.

    It neets to be changed to a filter or maybe to settings option.

    I hope the plugin authors will change this soon.


    #1118

    nickthegeek
    Keymaster
    Post count: 751

    David,

    Actually this was snuck in without much fan fair when it went up to v. 1.0. This code should work
    add_filter( 'agentpress_listings_post_type_args', 'child_agentpress_listings_post_type_args' );
    function child_agentpress_listings_post_type_args( $args ){
    $args['rewrite']['slug'] = 'listings';
    return $args;
    }

    #1119

    David Decker
    Moderator
    Post count: 93

    Ah, thanks, Nick!

    I just had a blackout and opened wrong version number and looked in wrong line…

    You’re so right — that’s the way to go!


    #2078

    mjim
    Participant
    Post count: 9

    I tried this and it did change the slug but I get a 404 page:

    http://www.demoriata.com/pekisko/stallions/maisies-boon-bar/

    #20078

    asterbird
    Participant
    Post count: 101

    Save your permalinks settings again and refresh.

    #33721

    jmantis
    Participant
    Post count: 1

    Where exactly I should add this code?

    And if I will change from $args['rewrite']['slug'] = ‘listings’; to $args['rewrite']['slug'] = ”; Will my url will be shorter? I would like to have mywebsite.com/post instead of mywebsite.com/listings/post is that possible? As I have only one property.

    #46306

    seattlesavvy
    Participant
    Post count: 4

    ^ ditto.

    “it was added…”  looked in single-listing.php and functions.php.  does that code need to be added or edited?  ty

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

You must be logged in to reply to this topic.