URLs

URLを取得する関数をまとめたものです。

home_url() Home URL http://www.example.com
site_url() Site directory URL http://www.example.com OR http://www.example.com/wordpress
admin_url() Admin directory URL http://www.example.com/wp-admin/
includes_url() Includes directory URL http://www.example.com/wp-includes/
content_url() Content directory URL http://www.example.com/wp-content/
plugins_url() Plugins directory URL http://www.example.com/wp-content/plugins/
get_stylesheet_directory_uri
get_template_directory_uri
get_theme_root_uri
theme_url Themes directory URL https://core.trac.wordpress.org/ticket/18302(Improve child theme file inheritance by introducing theme_url to locate a file URI)
get_locale_stylesheet_uri ローカライズスタイルシートのURL http://example.com/wordpress/wp-content/themes/example_theme/ja.cssがあれば、URLをリターンなければ、{$wp_locale->text_direction}.cssがあれば、リターンそれもなければ、沈黙
discover_pingback_server_uri
get_page_uri
get_theme_data
wp_logout_url
wp_lostpassword_url
wp_login_url
wp_nonece_url
trackback_url
network_site_url
network_admin_url
network_home_url
edit_bookmark_link
edit_comment_link
edit_post_link
edit_tag_link
the_author_posts_lilnk
cancel_comment_reply_link
comment_author_email_link
comment_author_link
comment_author_rss
comment_author_url
comment_author_url_link
comment_reply_link
comment_text
comments_link
comments_popup_link
comments_rss_link
next_comments_link
paginate_comments_links
permalink_comments_rss
previous_comments_link
the_permalink
user_trailingslashit
permalink_anchor
get_permalink
get_post_permalink
post_permalink
get_page_link
get_attachment_link
wp_get_attachment_image_src
get_month_link
get_day_link
get_year_link
get_author_posts_url
wp_upload_dir
wp_get_upload_dir

Current URL

Relative URL

wp_make_link_relative

WordPress current_url

パーマリンクデフォルト以外

パーマリンクがデフォルトの場合

get post id from URL

$postid = url_to_postid( $url )

get category archive link



コメントは受け付けていません