내 wordpress 인스턴스에 부울 true/false 값인 5 개의 사용자 정의 필드가 있습니다. 그래서 하이픈 URL에 값을 추가하는 경우와 -Permalink from custom post type wordpress
property_type_investment, property_type_office, property_type_rental, property_type_industrial, property_type_land
는 해당하는 메타 값의 각을 확인합니다이 사용자 정의 포스트 유형에 대한 영구 링크를 생성 할 수 있나요 ?
예 : property_type_investment, property_type_office 및 property_type_land가 true 인 경우. 나는
가 여기 내 레지스터 포스트 타입//명부/투자 사무실 토지/포스트 제목 ... 영구 링크가되고 싶습니다.
register_post_type('properties',
array(
'labels' => array(
'name' => 'Properties',
'singular_name' => 'Property',
'add_new' => 'Add New',
'add_new_item' => 'Add New Property',
'edit' => 'Edit',
'edit_item' => 'Edit Property',
'new_item' => 'New Property',
'view' => 'View',
'view_item' => 'View Property',
'search_items' => 'Search Properties',
'not_found' => 'No Property found',
'not_found_in_trash' => 'No Properties found in Trash',
'parent' => 'Parent Property'
),
'public' => true,
'rewrite' => array('slug'=>'listings'),
'menu_position' => 15,
'supports' => array('title', 'editor', 'comments', 'thumbnail', 'custom-fields'),
'taxonomies' => array(''),
'has_archive' => true
)
);
응답 해 주셔서 감사합니다 ...이 솔루션은 투자 오피스 - 랜드 조합에만 사용할 수있는 것 같습니다. 내가 나열한 5 개 필드를 기반으로 가능한 모든 조합을 해결할 수 있어야합니다. 예 :/투자 /,/사무실 임대 /,/투자 사무실 임대/토지 산업/등 ... – Greg
이것을 확인할 수 있습니까 [link] (http://code.tutsplus.com/ articles/custom-page-template-page-based-url-rewrite-wp-30564)를 사용하십시오. 이것은 내가 위에서 쓴 모든 것을 깊이 설명했다. – Arka