• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

[URL] change "listings" parameter to

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: Agentpress, listings, plugin, slug

  • This topic has 7 replies, 7 voices, and was last updated 9 years ago by seattlesavvy.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • November 18, 2012 at 1:15 am #515
    thanhlm85
    Member

    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

    November 21, 2012 at 7:09 am #1095
    David Decker
    Member

    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.


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    November 21, 2012 at 8:57 am #1118
    nickthegeek
    Member

    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;
    }

    November 21, 2012 at 8:59 am #1119
    David Decker
    Member

    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!


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    November 28, 2012 at 1:14 pm #2078
    mjim
    Member

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

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

    February 13, 2013 at 10:12 am #20078
    asterbird
    Member

    Save your permalinks settings again and refresh.

    April 7, 2013 at 10:29 am #33721
    jmantis
    Member

    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.

    June 16, 2013 at 9:54 pm #46306
    seattlesavvy
    Member

    ^ ditto.

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

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble