Change permalink '/listings/' to '/apartments/' in AgentPress

Community Forums Forums Design Tips and Tricks Change permalink '/listings/' to '/apartments/' in AgentPress

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  asterbird 1 year, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18351

    asterbird
    Participant
    Post count: 101

    How do I change the permalinks from listings to apartments in the AgentPress Listings plugin?

    I have http://www.my-website.com/listings/apartment-60/
    and I would like to change it to
    http://www.my-website.com/available-apartments/apartment-60/

    Any ideas?

    #19590

    Jen Baumann
    Keymaster
    Post count: 416

    See http://www.studiopress.com/forums/topic/url-change-listings-parameter-to/


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #20079

    asterbird
    Participant
    Post count: 101

    Thanks, Jen! That worked.

    But document title still shows ‘Listings’ Where do I change that?

    #20122

    Jen Baumann
    Keymaster
    Post count: 416

    Like this:
    [php]
    add_filter( ‘agentpress_listings_post_type_args’, ‘child_agentpress_listings_post_type_args’ );
    function child_agentpress_listings_post_type_args( $args ){
    $args['labels']['name'] = ‘Apartments’;
    return $args;
    }[/php]

    You can pretty much take any of the args from this:
    [php]function create_post_type() {
    $args = apply_filters( ‘agentpress_listings_post_type_args’,
    array(
    ‘labels’ => array(
    ‘name’ => __( ‘Listings’, ‘apl’ ),
    ‘singular_name’ => __( ‘Listing’, ‘apl’ ),
    ‘add_new’ => __( ‘Add New’, ‘apl’ ),
    ‘add_new_item’ => __( ‘Add New Listing’, ‘apl’ ),
    ‘edit’ => __( ‘Edit’, ‘apl’ ),
    ‘edit_item’ => __( ‘Edit Listing’, ‘apl’ ),
    ‘new_item’ => __( ‘New Listing’, ‘apl’ ),
    ‘view’ => __( ‘View Listing’, ‘apl’ ),
    ‘view_item’ => __( ‘View Listing’, ‘apl’ ),
    ‘search_items’ => __( ‘Search Listings’, ‘apl’ ),
    ‘not_found’ => __( ‘No listings found’, ‘apl’ ),
    ‘not_found_in_trash’ => __( ‘No listings found in Trash’, ‘apl’ )
    ),
    ‘public’ => true,
    ‘query_var’ => true,
    ‘menu_position’ => 6,
    ‘menu_icon’ => APL_URL . ‘images/apl-icon-16×16.png’,
    ‘has_archive’ => true,
    ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘genesis-seo’, ‘genesis-layouts’, ‘genesis-simple-sidebars’ ),
    ‘rewrite’ => array( ‘slug’ => ‘listings’ ),
    )
    );

    register_post_type( ‘listing’, $args );

    }[/php]


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #20975

    asterbird
    Participant
    Post count: 101

    Thanks, I was able to change all the labels. I see that I can decide what to support, which is great as I wanted to take out the genesis-layouts for the apartments.

    How to do that? I tried this:

    [php]

    $args['supports']['genesis-layouts'] = FALSE;

    [/php]

    But the genesis layouts still show in the edit screen.

    #21465

    asterbird
    Participant
    Post count: 101

    Actually, that was a different issue. I used the code found here to unregister genesis layouts.

    But I noticed that in the Listings admin screen, there is a heading that says “Listing Title”  I still need to change that, but it’s an admin ui thing. Anyone know how to do this?

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

The topic ‘Change permalink '/listings/' to '/apartments/' in AgentPress’ is closed to new replies.