早上好我正在尝试使用公共查询变量查询各种Wordpress页面,例如
http://dmkim1979.ru/?p=37 // single post
http://dmkim1979.ru/?page_id=40 // single page
但我不知道如何使用这些变量中的大多数。我在任何地方都找不到关于这个主题的完整信息。
公共查询变量的完整列表为
var $public_query_vars = array(
\'m\', \'p\', \'posts\',
\'w\', \'cat\',
\'withcomments\', \'withoutcomments\',
\'s\', \'search\', \'exact\',
\'sentence\', \'calendar\', \'page\',
\'paged\',
\'more\',
\'tb\', \'pb\',
\'author\', \'order\', \'orderby\',
\'year\', \'monthnum\', \'day\',
\'hour\',\'minute\', \'second\',
\'name\', \'category_name\',
\'tag\', \'feed\',
\'author_name\', \'static\',
\'pagename\', \'page_id\', \'error\',
\'comments_popup\',
\'attachment\', \'attachment_id\',
\'subpost\', \'subpost_id\',
\'preview\', \'robots\',
\'taxonomy\', \'term\', \'cpage\',
\'post_type\');
我设法直观地找出了部分主题的用法,例如
http://dmkim1979.ru/?p=37 // single post
http://dmkim1979.ru/?page_id=40 // single page
http://dmkim1979.ru/?paged=4 // page 4 of 10 in archive
http://dmkim1979.ru/?m=201310 // 10-2013 archive
http://dmkim1979.ru/?monthnum=10 // month 10 archive
http://dmkim1979.ru/?year=2013 // year archive
http://dmkim1979.ru/?day=12 // daily archive (current year and month)
http://dmkim1979.ru/?cat=3 // category archive
http://dmkim1979.ru/?tag=tag4 // tag archive
http://dmkim1979.ru/?rating=rating4 // custom taxonomy archive
http://dmkim1979.ru/?post_type=tickets // custom post type archive
http://dmkim1979.ru/?author=1 // author archive by id
http://dmkim1979.ru/?author_name=admin // author archive by name
http://dmkim1979.ru/?s=uuu // search archive
http://dmkim1979.ru/?error=404 // page not found
http://dmkim1979.ru/?feed=rss2 // output feed
但其他人仍然很神秘,比如
\'posts\', \'w\', \'withcomments\', \'withoutcomments\', \'search\', \'exact\',
\'sentence\', \'calendar\', \'page\', \'more\', \'tb\', \'pb\',
\'order\', \'orderby\',
\'hour\',\'minute\', \'second\',
\'name\', \'category_name\',
\'static\',
\'pagename\',
\'comments_popup\',
\'attachment\', \'attachment_id\',
\'subpost\', \'subpost_id\',
\'preview\', \'robots\',
\'taxonomy\', \'term\', \'cpage\'
有谁能解释一下如何使用它们吗?(对不起我的英语。)