Community Forums › Forums › Archived Forums › Design Tips and Tricks › Change permalink '/listings/' to '/apartments/' in AgentPress
Tagged: Agentpress, change permalink, custom post types
- This topic has 5 replies, 2 voices, and was last updated 13 years, 1 month ago by
asterbird.
-
AuthorPosts
-
February 5, 2013 at 7:27 pm #18351
asterbird
MemberHow 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 #19590February 13, 2013 at 10:13 am #20079asterbird
MemberThanks, Jen! That worked.
But document title still shows 'Listings' Where do I change that?
February 13, 2013 at 1:17 pm #20122Jen Baumann
ParticipantLike 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 ); }February 18, 2013 at 7:27 am #20975asterbird
MemberThanks, 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 #21465 -
AuthorPosts
- The topic ‘Change permalink '/listings/' to '/apartments/' in AgentPress’ is closed to new replies.