Community Forums › Forums › Design Tips and Tricks › Change permalink '/listings/' to '/apartments/' in AgentPress
Tagged: Agentpress, change permalink, custom post types
This topic contains 5 replies, has 2 voices, and was last updated by asterbird 3 months ago.
-
AuthorPosts
-
February 5, 2013 at 7:27 pm #18351
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?
February 11, 2013 at 8:12 am #19590See http://www.studiopress.com/forums/topic/url-change-listings-parameter-to/
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookFebruary 13, 2013 at 10:13 am #20079Thanks, Jen! That worked.
But document title still shows ‘Listings’ Where do I change that?
February 13, 2013 at 1:17 pm #20122Like this:
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; }You can pretty much take any of the args from this:
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-16x16.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 ); }
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookFebruary 18, 2013 at 7:27 am #20975Thanks, 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:
$args['supports']['genesis-layouts'] = FALSE;
But the genesis layouts still show in the edit screen.
February 19, 2013 at 3:41 pm #21465Actually, 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?
-
AuthorPosts
The topic ‘Change permalink '/listings/' to '/apartments/' in AgentPress’ is closed to new replies.