get_the_category_list

来源:互联网 发布:四川厚名网络 编辑:程序博客网 时间:2024/06/05 15:17

get_the_category_list


  • WordPress函数参考
  • add_menu_page()函数详解
  • add_options_page()添加选项子菜单
  • add_action()向WordPress添加动作
  • add_filter()添加函数到特定的过滤器
  • query_posts()自定义查询语句
  • wp_title()显示WordPress页面的标题
  • wp_get_archives根据日期显示日志归档
  • get_boundary_post()获取最新/最旧文章
  • get_adjacent_post()查找WordPress相邻文章
  • add_role()新的用户角色到WordPress
  • get_children()获取文章的附件存档和子页
  • get_extended()获取文章的简介
  • get_next_post()获取当前文章的下一篇文章
  • next_posts_link()显示下一页文章列表的链接
  • get_next_posts_link获取下一页文章列表的链接地址
  • get_permalink获取文章的固定链接
  • the_permalink()输出文章的永久链接
  • the_excerpt输出文章的摘要
  • get_the_excerpt获取文章的简介
  • wp_link_pages()长文章分页函数
  • Template_Tags
  • Plugin_API
  • Contributing_to_WordPress
  • get_the_excerpt
  • the_excerpt
  • get_the_post_thumbnail
  • get_post_field
  • get_previous_posts_link
  • get_post_ancestors
  • previous_posts_link
  • get_post_mime_type
  • get_posts
  • get_post_status
  • have_posts
  • get_post_format
  • is_post
  • set_post_format
  • is_single
  • get_edit_post_link
  • is_sticky
  • get_delete_post_link
  • get_the_ID
  • get_previous_post
  • the_ID
  • the_post
  • wp_get_recent_posts
  • wp_get_single_post
  • remove_post_type_support
  • has_post_thumbnail
  • post_type_supports
  • is_post_type_hierarchical
  • has_excerpt
  • set_post_type
  • wp_delete_post
  • has_post_format
  • post_type_exists
  • wp_insert_post
  • register_post_status
  • get_post_type
  • wp_publish_post
  • register_post_type
  • get_post_types
  • wp_trash_post
  • is_post_type_archive
  • get_post_type_archive_link
  • wp_update_post
  • post_type_archive_title
  • get_post_type_object
  • get_all_page_ids
  • add_post_type_support
  • get_post_type_capabilities
  • get_ancestors
  • get_post_type_labels
  • get_page
  • get_page_by_path
  • get_page_link
  • get_page_by_title
  • wp_page_menu
  • get_page_children
  • wp_dropdown_pages
  • get_page_hierarchy
  • add_post_meta
  • get_page_uri
  • delete_post_meta
  • get_pages
  • get_post_custom
  • is_page
  • get_post_custom_keys
  • page_uri_index
  • get_post_custom_values
  • wp_link_pages
  • get_post_meta
  • wp_list_pages
  • update_post_meta
  • register_meta
  • get_attached_file
  • image_resize
  • wp_insert_attachment
  • wp_delete_attachment
  • wp_count_posts
  • WP_Image_Editor
  • wp_get_attachment_image
  • wp_get_mime_types
  • is_attachment
  • wp_get_attachment_link
  • wp_mime_type_icon
  • is_local_attachment
  • wp_get_attachment_image_src
  • wp_generate_attachment_metadata
  • set_post_thumbnail
  • wp_get_attachment_metadata
  • wp_prepare_attachment_for_js
  • update_attached_file
  • wp_get_attachment_thumb_file
  • wp_update_attachment_metadata
  • wp_attachment_is_image
  • wp_get_attachment_thumb_url
  • get_bookmark
  • wp_create_thumbnail
  • wp_get_attachment_url
  • get_bookmarks
  • wp_check_for_changed_slugs
  • wp_list_bookmarks
  • wp_set_post_categories
  • wp_get_post_categories
  • wp_get_post_tags
  • get_the_author
  • wp_set_post_tags
  • the_author
  • wp_get_post_terms
  • get_the_author_posts
  • wp_set_post_terms
  • get_the_content
  • wp_count_terms
  • the_content
  • has_term
  • get_the_title
  • is_object_in_term
  • the_title
  • add_meta_box
  • the_title_attribute
  • remove_meta_box
  • wp_trim_excerpt
  • wp_get_post_revision
  • wp_get_post_revisions
  • wp_is_post_revision
  • get_category_by_slug
  • paginate_links
  • get_the_category_by_ID
  • wp_category_checklist
  • cat_is_ancestor_of
  • get_the_category_list
  • wp_dropdown_categories
  • get_all_category_ids
  • get_category_link
  • wp_list_categories
  • get_cat_ID
  • get_category_parents
  • wp_create_category
  • get_cat_name
  • get_the_category
  • wp_delete_category
  • get_categories
  • single_cat_title
  • wp_insert_category
  • get_category
  • in_category
  • get_tag
  • get_category_by_path
  • is_category
  • get_tag_link
  • the_category
  • get_tags
  • get_the_tags
  • get_the_tag_list
  • has_tag
  • get_taxonomy
  • is_tag
  • get_taxonomies
  • the_tags
  • get_term
  • single_tag_title
  • get_the_term_list
  • tag_description
  • get_term_by
  • wp_generate_tag_cloud
  • the_terms
  • wp_tag_cloud
  • get_the_terms
  • get_object_taxonomies
  • get_term_children
  • get_edit_term_link
  • get_term_link
  • get_terms
  • is_taxonomy
  • is_tax
  • wp_set_object_terms
  • is_taxonomy_hierarchical
  • wp_insert_term
  • get_role
  • is_term
  • wp_update_term
  • get_super_admins
  • taxonomy_exists
  • wp_delete_term
  • is_super_admin
  • term_exists
  • wp_terms_checklist
  • map_meta_cap
  • register_taxonomy
  • add_cap
  • remove_cap
  • register_taxonomy_for_object_type
  • add_role
  • remove_role
  • wp_get_object_terms
  • author_can
  • user_can
  • wp_remove_object_terms
  • current_user_can
  • auth_redirect
  • current_user_can_for_blog
  • count_users
  • count_many_users_posts
  • count_user_posts
  • email_exists
  • user_pass_ok
  • get_currentuserinfo
  • wp_authenticate
  • get_current_user_id
  • username_exists
  • get_profile
  • validate_username
  • get_user_by
  • wp_dropdown_users
  • get_userdata
  • wp_get_current_user
  • get_usernumposts
  • wp_set_current_user
  • get_users
  • wp_set_password
  • set_current_user
  • get_author_posts_url
  • get_the_modified_author
  • is_multi_author
  • add_user_meta
  • is_user_logged_in
  • delete_user_meta
  • wp_login_form
  • do_feed_atom
  • get_user_meta
  • wp_signon
  • do_feed_rdf
  • update_user_meta
  • wp_logout
  • do_feed_rss
  • get_the_author_meta
  • wp_loginout
  • do_feed_rss2
  • wp_create_user
  • bloginfo_rss
  • fetch_feed
  • wp_delete_user
  • comment_author_rss
  • fetch_rss
  • wp_insert_user
  • comment_link
  • get_author_feed_link
  • wp_update_user
  • comment_text_rss
  • get_bloginfo_rss
  • do_feed
  • get_category_feed_link
  • get_comment_author_rss
  • get_comment_link
  • get_post_comments_feed_link
  • the_title_rss
  • get_rss
  • the_category_rss
  • get_search_comments_feed_link
  • the_content_rss
  • get_search_feed_link
  • the_excerpt_rss
  • get_the_category_rss
  • wp_rss
  • get_the_title_rss
  • wp_remote_get
  • permalink_single_rss
  • wp_remote_retrieve_body
  • post_comments_feed_link
  • wp_get_http_headers
  • rss_enclosure
  • wp_remote_fopen
  • add_ping
  • add_comment_meta
  • check_comment
  • generic_ping
  • comment_text
  • get_approved_comments
  • get_pung
  • comment_form
  • get_avatar
  • get_to_ping
  • comments_number
  • get_comment
  • have_comments
  • discover_pingback_server_uri
  • get_comment_text
  • get_comment_author
  • delete_comment_meta
  • get_comment_meta
  • is_trackback
  • do_all_pings
  • get_comments
  • pingback
  • do_enclose
  • wp_list_comments
  • privacy_ping_filter
  • do_trackbacks
  • get_enclosed
  • sanitize_comment_cookies
  • get_lastcommentmodified
  • trackback
  • trackback_url_list
  • trackback_url
  • update_comment_meta
  • wp_new_comment
  • weblog_ping
  • wp_set_comment_status
  • wp_allow_comment
  • wp_throttle_comment_flood
  • wp_count_comments
  • wp_update_comment
  • wp_delete_comment
  • wp_update_comment_count
  • wp_filter_comment
  • wp_update_comment_count_now
  • wp_get_comment_status
  • comment_class
  • wp_get_current_commenter
  • comment_ID
  • wp_insert_comment
  • comment_author
  • comment_date
  • comment_time
  • get_comment_date
  • apply_filters
  • get_comment_time
  • apply_filters_ref_array
  • do_action_ref_array
  • paginate_comments_links
  • current_filter
  • did_action
  • previous_comments_link
  • merge_filters
  • remove_action
  • next_comments_link
  • remove_filter
  • remove_all_actions
  • get_comment_pages_count
  • remove_all_filters
  • plugin_basename
  • Filter_Reference
  • Action_Reference
  • plugins_url
  • has_filter
  • has_action
  • get_plugin_data
  • add_filter
  • add_action
  • get_admin_page_title
  • do_action
  • plugin_dir_path
  • register_deactivation_hook
  • register_activation_hook
  • menu_page_url
  • register_widget
  • is_plugin_active
  • the_widget
  • is_plugin_active_for_network
  • unregister_widget
  • is_plugin_inactive
  • wp_add_dashboard_widget
  • is_plugin_page
  • wp_convert_widget_settings
  • add_contextual_help
  • wp_get_sidebars_widgets
  • get_plugins
  • wp_get_widget_defaults
  • Widgets_API
  • wp_register_sidebar_widget
  • is_active_widget
  • wp_register_widget_control
  • wp_set_sidebars_widgets
  • wp_unregister_sidebar_widget
  • wp_unregister_widget_control
  • add_settings_section
  • wp_widget_description
  • add_settings_error
  • remove_all_shortcodes
  • Settings_API
  • get_settings_errors
  • shortcode_atts
  • register_setting
  • settings_errors
  • shortcode_parse_atts
  • unregister_setting
  • Shortcode_API
  • strip_shortcodes
  • settings_fields
  • add_shortcode
  • comments_template
  • do_settings_fields
  • do_shortcode
  • get_footer
  • do_settings_sections
  • do_shortcode_tag
  • get_header
  • add_settings_field
  • get_shortcode_regex
  • get_sidebar
  • remove_shortcode
  • get_search_form
  • add_custom_image_header
  • add_custom_background
  • add_image_size
  • get_body_class
  • add_theme_support
  • get_category_template
  • body_class
  • get_comments_popup_template
  • current_theme_supports
  • get_current_theme
  • dynamic_sidebar
  • get_date_template
  • get_404_template
  • get_header_image
  • get_archive_template
  • get_header_textcolor
  • get_attachment_template
  • get_home_template
  • get_author_template
  • get_locale_stylesheet_uri
  • get_page_template
  • get_paged_template
  • get_post_class
  • get_taxonomy_template
  • get_query_template
  • get_template
  • get_theme_mods
  • get_search_template
  • get_template_directory
  • get_theme_root
  • get_single_template
  • get_template_directory_uri
  • get_theme_roots
  • get_stylesheet
  • get_template_part
  • get_theme_root_uri
  • get_stylesheet_directory
  • get_theme
  • get_themes
  • get_stylesheet_directory_uri
  • wp_get_themes
  • has_header_image
  • get_stylesheet_uri
  • get_theme_data
  • header_image
  • get_tag_template
  • get_theme_support
  • header_textcolor
  • get_theme_mod
  • in_the_loop
  • is_active_sidebar
  • is_child_theme
  • is_admin_bar_showing
  • preview_theme_ob_filter
  • is_customize_preview
  • preview_theme_ob_filter_callback
  • is_dynamic_sidebar
  • register_nav_menu
  • language_attributes
  • register_nav_menus
  • load_template
  • get_registered_nav_menus
  • locale_stylesheet
  • wp_create_nav_menu
  • locate_template
  • register_sidebar
  • post_class
  • register_sidebars
  • preview_theme
  • register_theme_directory
  • remove_theme_mod
  • remove_theme_mods
  • remove_theme_support
  • wp_clean_themes_cache
  • require_if_theme_supports
  • wp_get_archives
  • addslashes_gpc
  • search_theme_directories
  • wp_get_nav_menu_items
  • antispambot
  • set_theme_mod
  • wp_get_theme
  • attribute_escape
  • switch_theme
  • wp_nav_menu
  • backslashit
  • validate_current_theme
  • wp_oembed_remove_provider
  • balanceTags
  • unregister_nav_menu
  • wp_page_menu
  • clean_pre
  • unregister_sidebar
  • wp_title
  • clean_url
  • wp_add_inline_style
  • absint
  • convert_chars
  • add_magic_quotes
  • convert_smilies
  • esc_attr
  • ent2ncr
  • esc_html
  • funky_javascript_fix
  • esc_js
  • htmlentities2
  • esc_textarea
  • is_email
  • esc_sql
  • js_escape
  • esc_url
  • make_clickable
  • esc_url_raw
  • popuplinks
  • force_balance_tags
  • remove_accents
  • format_to_edit
  • sanitize_email
  • format_to_post
  • sanitize_file_name
  • sanitize_html_class
  • sanitize_key
  • sanitize_mime_type
  • stripslashes_deep
  • sanitize_option
  • trailingslashit
  • wp_filter_nohtml_kses
  • sanitize_sql_orderby
  • untrailingslashit
  • wp_iso_descrambler
  • sanitize_text_field
  • urlencode_deep
  • wp_kses
  • sanitize_title
  • url_shorten
  • wp_kses_array_lc
  • sanitize_title_for_query
  • utf8_uri_encode
  • wp_kses_attr
  • sanitize_title_with_dashes
  • wpautop
  • wp_kses_bad_protocol
  • sanitize_user
  • wptexturize
  • wp_kses_bad_protocol_once
  • seems_utf8
  • wp_filter_kses
  • wp_kses_bad_protocol_once2
  • wp_filter_post_kses
  • wp_kses_check_attr_val
  • wp_kses_hair
  • wp_kses_decode_entities
  • wp_kses_hook
  • wp_kses_version
  • wp_kses_html_error
  • wp_make_link_relative
  • wp_kses_js_entities
  • wp_normalize_path
  • wp_kses_no_null
  • wp_rel_nofollow
  • wp_kses_normalize_entities
  • wp_richedit_pre
  • wp_kses_normalize_entities2
  • wp_specialchars
  • wp_kses_split
  • wp_trim_words
  • wp_kses_split2
  • zeroise
  • wp_kses_strip_slashes
  • current_time
  • date_i18n
  • get_calendar
  • get_the_time
  • get_date_from_gmt
  • the_modified_time
  • get_lastpostdate
  • is_serialized
  • get_the_modified_time
  • get_lastpostmodified
  • is_serialized_string
  • get_weekstartend
  • get_day_link
  • maybe_serialize
  • get_year_link
  • get_gmt_from_date
  • maybe_unserialize
  • human_time_diff
  • get_month_link
  • add_option
  • is_new_day
  • the_date
  • add_site_option
  • iso8601_timezone_to_offset
  • get_the_date
  • delete_option
  • iso8601_to_datetime
  • the_time
  • delete_site_option
  • mysql2date
  • form_option
  • get_site_option
  • get_alloptions
  • get_site_url
  • get_transient
  • get_admin_url
  • delete_transient
  • get_user_option
  • set_site_transient
  • get_option
  • get_site_transient
  • update_option
  • delete_site_transient
  • update_site_option
  • add_menu_page
  • update_user_option
  • remove_menu_page
  • wp_load_alloptions
  • add_submenu_page
  • set_transient
  • remove_submenu_page
  • add_object_page
  • add_utility_page
  • add_comments_page
  • add_theme_page
  • add_dashboard_page
  • add_users_page
  • submit_button
  • add_links_page
  • add_node
  • get_submit_button
  • add_management_page
  • remove_node
  • check_admin_referer
  • add_media_page
  • add_group
  • check_ajax_referer
  • get_node
  • wp_create_nonce
  • add_pages_page
  • get_nodes
  • wp_explain_nonce
  • add_plugins_page
  • checked
  • wp_get_original_referer
  • add_posts_page
  • disabled
  • wp_get_referer
  • selected
  • wp_nonce_ays
  • wp_nonce_url
  • wp_nonce_field
  • wp_original_referer_field
  • _2
  • wp_referer_field
  • _x
  • wp_send_json
  • _n
  • wp_send_json_error
  • _nx
  • wp_send_json_success
  • _e
  • wp_verify_nonce
  • _ex
  • xmlrpc_getpostcategory
  • _2ngettext
  • xmlrpc_getposttitle
  • esc_attr_2
  • xmlrpc_removepostdata
  • esc_attr_e
  • get_locale
  • load_default_textdomain
  • load_plugin_textdomain
  • wp_next_scheduled
  • load_textdomain
  • wp_reschedule_event
  • wp_enqueue_script
  • load_theme_textdomain
  • wp_schedule_event
  • wp_enqueue_style
  • is_rtl
  • wp_schedule_single_event
  • wp_localize_script
  • spawn_cron
  • wp_unschedule_event
  • wp_register_script
  • wp_clear_scheduled_hook
  • Conditional_Tags
  • wp_register_style
  • wp_cron
  • wp_dequeue_script
  • wp_script_is
  • wp_get_schedule
  • wp_dequeue_style
  • wp_style_is
  • wp_get_schedules
  • wp_deregister_script
  • get_tax_sql
  • wp_deregister_style
  • get_meta_sql
  • add_editor_style
  • get_posts_by_author_sql
  • add_query_arg
  • flush_rewrite_rules
  • add_rewrite_rule
  • get_bloginfo
  • admin_url
  • get_num_queries
  • bool_from_yn
  • get_post_stati
  • cache_javascript_headers
  • get_post_statuses
  • capital_P_dangit
  • get_query_var
  • clean_blog_cache
  • home_url
  • content_url
  • includes_url
  • do_robots
  • is_blog_installed
  • is_main_site
  • is_main_query
  • is_multisite
  • plugin_dir_url
  • is_ssl
  • query_posts
  • wp
  • is_wp_error
  • remove_query_arg
  • wp_cache_set
  • log_app
  • rewind_posts
  • wp_cache_get
  • make_url_footnote
  • setup_postdata
  • wp_cache_reset
  • network_admin_url
  • site_url
  • wp_check_filetype
  • network_home_url
  • status_header
  • wp_clearcookie
  • network_site_url
  • unzip_file
  • wp_die
  • nocache_headers
  • validate_file
  • wp_editor
  • validate_file_to_edit
  • wp_footer
  • wp_get_image_editor
  • wp_get_cookie_login
  • wp_get_installed_translations
  • wp_password_change_notification
  • wp_hash
  • wp_notify_moderator
  • wp_handle_sideload
  • wp_notify_postauthor
  • wp_head
  • wp_parse_args
  • wp_install_defaults
  • wp_redirect
  • wp_is_mobile
  • wp_reset_postdata
  • wp_mail
  • wp_reset_query
  • wp_mkdir_p
  • wp_salt
  • wp_new_user_notification
  • wp_set_auth_cookie
  • wp_safe_redirect
  • wp_upload_bits
  • wp_upload_dir
  • avoid_blog_page_permalink_collision
  • wp_list_pluck
  • check_import_new_users
  • mu_dropdown_languages
  • wp_text_diff
  • check_upload_size
  • new_user_email_admin_notice
  • post_submit_meta_box
  • choose_primary_blog
  • redirect_user_to_blog
  • WPMU_Functions
  • display_space_usage
  • refresh_user_details
  • confirm_delete_users
  • fix_import_form_size
  • revoke_super_admin
  • is_user_member_of_blog
  • format_code_lang
  • secret_salt_warning
  • wp_dashboard_quota
  • get_site_allowed_themes
  • send_confirmation_on_profile_email
  • admin_notice_feed
  • grant_super_admin
  • show_post_thumbnail_warning
  • ms_deprecated_blogs_file
  • site_admin_notice
  • update_option_new_admin_email
  • sync_category_tag_slugs
  • update_user_status
  • get_blogaddress_by_domain
  • upload_is_user_over_quota
  • get_blogaddress_by_id
  • upload_space_setting
  • get_blogaddress_by_name
  • wpmu_delete_blog
  • get_blog_details
  • wpmu_delete_user
  • get_blog_option
  • wpmu_get_blog_allowedthemes
  • get_blog_status
  • _admin_notice_multisite_activate_plugins_page
  • get_id_from_blogname
  • add_blog_option
  • get_last_updated
  • delete_blog_option
  • is_archived
  • refresh_blog_details
  • restore_current_blog
  • switch_to_blog
  • ms_upload_constants
  • update_archived
  • add_existing_user_to_blog
  • get_active_blog_for_user
  • update_blog_details
  • add_new_user_to_blog
  • get_admin_users_for_domain
  • update_blog_option
  • add_user_to_blog
  • get_blogs_of_user
  • update_blog_status
  • check_upload_mimes
  • get_blog_count
  • wpmu_update_blogs_date
  • create_empty_blog
  • get_blog_id_from_url
  • ms_cookie_constants
  • domain_exists
  • get_blog_permalink
  • ms_file_constants
  • filter_SSL
  • get_blog_post
  • ms_subdomain_constants
  • fix_phpmailer_messageid
  • get_current_site
  • force_ssl_content
  • get_dashboard_blog
  • get_most_recent_post_of_user
  • get_dirsize
  • get_sitestats
  • install_blog_defaults
  • get_space_allowed
  • is_blog_user
  • get_space_used
  • is_email_address_unsafe
  • get_upload_space_available
  • is_upload_space_available
  • get_user_count
  • is_user_option_local
  • get_user_id_from_string
  • is_user_spammy
  • global_terms
  • maybe_add_existing_user_to_blog
  • insert_blog
  • maybe_redirect_404
  • install_blog
  • newblog_notify_siteadmin
  • newuser_notify_siteadmin
  • recurse_dirsize
  • users_can_register_signup_filter
  • redirect_this_site
  • welcome_user_msg_filter
  • wpmu_signup_blog_notification
  • remove_user_from_blog
  • wpmu_signup_user
  • signup_nonce_check
  • wp_get_sites
  • wpmu_signup_user_notification
  • signup_nonce_fields
  • wpmu_activate_signup
  • wpmu_validate_blog_signup
  • update_blog_public
  • wpmu_validate_user_signup
  • update_posts_count
  • wpmu_create_blog
  • wpmu_welcome_notification
  • upload_is_file_too_big
  • wpmu_create_user
  • wpmu_welcome_user_notification
  • upload_size_limit_filter
  • wpmu_log_new_registrations
  • get_current_site_name
  • wpmu_signup_blog
  • is_subdomain_install
  • ms_site_check
  • ms_not_installed
  • wpmu_current_site
  • WordPress插件API
  • Writing_a_Plugin
  • Theme_Development
  • Glossary
  • doing_filter
  • doing_action
  • register_uninstall_hook
  • Administration_Screens
  • Creating_Tables_with_Plugins
  • Managing_Plugins
  • WordPress模板标签介绍
  • bloginfo
  • Templates
  • Pluggable_Functions
  • Stepping_Into_Template_Tags
  • Anatomy_of_a_Template_Tag
  • Include_Tags
  • How_to_Pass_Tag_Parameters
  • Stepping_Into_Templates
  • Codex:Contributing
  • Codex:Guidelines
  • wp_logout_url
  • wp_login_url
  • wp_lostpassword_url
  • wp_register
  • wp_meta
  • bloginfo
  • the_author_link
  • get_current_blog_id
  • category_description
  • get_the_author_link
  • single_post_title
  • wp_list_categories
  • the_author_meta
  • single_term_title
  • term_description
  • the_author_posts
  • single_month_title
  • the_taxonomies
  • the_author_posts_link
  • get_archives_link
  • cancel_comment_reply_link
  • wp_list_authors
  • calendar_week_mod
  • comment_author_email
  • comment_author_email_link
  • wp_list_bookmarks
  • comment_author_IP
  • get_bookmark_field
  • comment_author_link
  • comment_author_url_link
  • comment_author_url
  • comment_excerpt
  • permalink_comments_rss
  • comment_form_title
  • user_trailingslashit
  • comment_id_fields
  • permalink_anchor
  • comment_reply_link
  • get_post_permalink
  • comment_type
  • post_permalink
  • comments_link
  • get_attachment_link
  • comments_popup_link
  • comments_popup_script
  • comments_rss_link
  • edit_bookmark_link
  • edit_comment_link
  • edit_post_link
  • edit_tag_link
  • previous_image_link
  • get_home_url
  • previous_post_link
  • wp_get_shortlink
  • get_search_link
  • sticky_class




字数4204 · 浏览 · 评论 0

Description

Retrieve category list in either HTML list or custom format. Generally used for quick, delimited (eg: comma-separated) lists of categories, as part of a post’s entry meta. For a more powerful, list-based function, see wp_list_categories().

Usage


<?php get_the_category_list( $separator, $parents, $post_id ); ?>

Parameters

$separator
(string) (optional) Optional, default is empty string. Separator for between the categories.
Default: empty string
$parents
(string) (optional) Optional. How to display the parents. Values: ‘multiple’, ‘single’, empty string
Default: empty string
$post_id
(int) (optional) Optional. Post ID to retrieve categories.
Default: false

Return Values

(string) 

Notes

Categories are ordered by name regardless of the parent-child category relationship. See this example from wp_list_categories() to display the Post categories with the category relationship intact.

Examples

Implementation in WordPress default Twenty Eleven theme

In content-single.php:

<?php/* translators: used between list items, there is a space after the comma */$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );/* translators: used between list items, there is a space after the comma */$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );if ( '' != $tag_list ) {$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );} elseif ( '' != $categories_list ) {$utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );} else {$utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );}printf($utility_text,$categories_list,$tag_list,esc_url( get_permalink() ),the_title_attribute( 'echo=0' ),get_the_author(),esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ));?>

Display as List Items

By leaving the $separator value empty, it will generate an unordered list instead, complete with classes.

<?php echo get_the_category_list(); ?>

Result:

<ul class="post-categories"><li><a href="http://myblog.com/category/business" title="View all posts in Business" rel="category tag">Business</a></li></ul>

Change Log

Since: 1.5.1

Source File

get_the_category_list() is located in wp-includes/category-template.php

Related

  • Article: Categories
  • Function: the_category()
  • Function: the_category_rss()
  • Function: single_cat_title()
  • Function: category_description()
  • Function: wp_dropdown_categories()
  • Function: wp_list_categories()
  • Function: get_the_category()
  • Function: get_the_category_by_ID()
  • Function: get_category_by_slug()
  • Function: get_the_category_list()
  • Function: get_category_parents()
  • Function: get_category_link()
  • Function: is_category()
  • Function: in_category()

See also index of Function Reference and index of Template Tags.

0 0
原创粉丝点击