Wordpress 분류 오류

샤 생크 마단
<?php
/*
Plugin Name: job list
Plugin URI: http://example.com/
Description: A complete and practical example of use of the Settings API. This plugin creates a new plugin administration page.
Author: WROX
Author URI: http://wrox.com
*/
function dwwp_register_taxonomy() {
    $singular = 'Location';
    $plural = 'Locations';
    $slug = str_replace( ' ', '_', strtolower( $singular ) );
    $labels = array(
        'name'                       => $plural,
        'singular_name'              => $singular,
        'search_items'               => 'Search ' . $plural,
        'popular_items'              => 'Popular ' . $plural,
        'all_items'                  => 'All ' . $plural,
        'parent_item'                => null,
        'parent_item_colon'          => null,
        'edit_item'                  => 'Edit ' . $singular,
        'update_item'                => 'Update ' . $singular,
        'add_new_item'               => 'Add New ' . $singular,
        'new_item_name'              => 'New ' . $singular . ' Name',
        'separate_items_with_commas' => 'Separate ' . $plural . ' with commas',
        'add_or_remove_items'        => 'Add or remove ' . $plural,
        'choose_from_most_used'      => 'Choose from the most used ' . $plural,
        'not_found'                  => 'No ' . $plural . ' found.',
        'menu_name'                  => $plural,
    );
    $args = array(
            'hierarchical'          => true,
            'labels'                => $labels,
            'show_ui'               => true,
            'show_admin_column'     => true,
            'query_var'             => true,
            'rewrite'               => array( 'slug' => $$slug ),
        );
    register_taxonomy( 'location', $args );
}
add_action( 'init', 'dwwp_register_taxonomy' );

나는 워드 프레스 플러그인을 만들고 분류를 잘 모른다. 그것은 다음과 같은 오류를 준다.주의 : 정의되지 않은 변수 : C : \ XAMMP2 \ htdocs \ rateIt \ wp-content \ plugins \ job-listing.php on line 37 ( 이것은 37 행 = register_taxonomy ( 'location', $ args);)주의 : 360 행 C : \ XAMMP2 \ htdocs \ rateIt \ wp-includes \ class-wp-taxonomy.php의 배열에서 문자열로 변환

우마 칸트 샤르마

object_type 인수 (객체에 대한 객체 유형의 이름 taxonomy. 객체 유형은 내장 된 Post 유형 또는 Custom Post Type등록 될 수있는 모든 유형일 수 있음) 가 누락 되었으므로 다음과 같이 사용해야합니다.

register_taxonomy( 'location', array('post type / custom post type') $args );

에 추가 $기호도 있습니다 $slug.

여기에서이 참고 자료를 살펴보십시오.

https://codex.wordpress.org/Function_Reference/register_taxonomy

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Wordpress MYSQL 오류

분류에서Dev

Wordpress 연결 오류

분류에서Dev

CPT URL의 WordPress 분류

분류에서Dev

WordPress 분류-OrderBy 문제

분류에서Dev

Nginx에 Wordpress 설치 오류

분류에서Dev

Wordpress의 Backbone.js 오류

분류에서Dev

Nginx 404 오류의 Wordpress Permalinks

분류에서Dev

Wordpress 리디렉션 오류

분류에서Dev

Wordpress를 사용한 Apache의 세분화 오류

분류에서Dev

WordPress 분류 카테고리 가져 오기

분류에서Dev

특정 분류법 가져 오기 관련 문제 (Wordpress)

분류에서Dev

부모 + 자식 Wordpress 분류 이름 / 슬러그 가져 오기

분류에서Dev

WordPress 설치 문제 : 구문 분석 오류

분류에서Dev

분할 오류 11 오류

분류에서Dev

구문 분석 오류 : WordPress 테마의 구문 오류, 예기치 않은 'endif'(T_ENDIF)

분류에서Dev

Wordpress 플러그인 PHP 구문 분석 오류 : 구문 오류, 예기치 않은 '{', ')'예상

분류에서Dev

Wordpress-맞춤 분류 / 카테고리 직계 하위 만 가져 오기

분류에서Dev

WordPress의 분류에서 사용자 정의 필드 값 가져 오기

분류에서Dev

C : 분할 오류

분류에서Dev

Topojson 분할 오류

분류에서Dev

memcpy, 분할 오류

분류에서Dev

memcpy, 분할 오류

분류에서Dev

세분화 오류

분류에서Dev

CURLpp, 분할 오류

분류에서Dev

분할 오류 11?

분류에서Dev

분할 오류 strcpy

분류에서Dev

Wordpress 관리자 패널 오류?

분류에서Dev

jquery wordpress 에코 기호 오류

분류에서Dev

WordPress 네트워크 설치 오류