Fix 404 errors on Ultimate Tag Warrior 究極のタグ戦士に404エラーを修正
I uses Ultimate Tag Warrior version 3.14159265 (February 4th, 2007) with WordPress 2.1 , it work great but there have some problem or bug that when you try to open /tag it will show 404 errors.私は( 2007年2月)ワードプレス 2.1 で4位、素晴らしい仕事が究極のタグ戦士3.14159265バージョンを使用していくつかの問題やバグを開こうとするとき、 / 404エラーが表示されるタグをしている。 I check and try to make the page /tag or /tag/ show all tags with function of Ultimate Tag Warrior .私はチェックして、ページ/タグまたは/タグ/究極のタグ戦士の機能を持つすべてのタグを表示するにしてください 。 Here is small changed.ここに小さな変更されています。
- function ultimate_tag_templates ( ) { 関数 ultimate_tag_templates ( ) (
- if ( $_GET [ "archive" ] == "tag" ) { ( に$ _GET [ "アーカイブ" ] == "タグ" ) (
- include ( TEMPLATEPATH . '/tag_all.php' ) ; ( TEMPLATEPATH含まれています。 ' / tag_all.php ' ) ;
- } else if ( get_query_var ( "tag" ) != "" ) { ) 他の人の場合 ( get_query_var ( "タグ" ) ! = " " ) (
- ultimate_get_posts ( ) ; ultimate_get_posts ( ) ;
- if ( is_feed ( ) ) { 場合 ( is_feed ( ) ) (
- return ; 復帰 ;
- } )
- if ( file_exists ( TEMPLATEPATH . "/tag.php" ) ) { もし ( file_existsは ( TEMPLATEPATH 。 " / tag.php " ) ) (
- if ( $_GET [ "feed" ] == '' ) { ( に$ _GET [ "が、 "フィード ] == '' ) (
- include ( TEMPLATEPATH . '/tag.php' ) ; ( TEMPLATEPATH含まれています。 ' / tag.php ' ) ;
- } )
- } else { する) else (
- // include(TEMPLATEPATH . '/index.php'); / / ( TEMPLATEPATH含まれています。 ' / index.phpを' ) ;
- } )
- } )
- } )
This function will process when you query for tag but you will see if you request with empty value of tag it won’t process anything and let Wordpress process this and finally it give 404 errorsこの関数はタグの場合のクエリを処理しますが、これって何か処理されるとするタグの場合は空の値を持つリクエストが表示されますWordpressのプロセスは、この、最後は404エラーを与える
I just made some changes to handle when user query with empty tag or open at /tag or /tag/私はいくつかの変更時に空のタグを持つユーザーのクエリまたは/タグまたは/タグで開いて処理するために作ら/
- function ultimate_tag_templates ( ) { 関数 ultimate_tag_templates ( ) (
- if ( $_GET [ "archive" ] == "tag" ) { ( に$ _GET [ "アーカイブ" ] == "タグ" ) (
- include ( TEMPLATEPATH . '/tag_all.php' ) ; ( TEMPLATEPATH含まれています。 ' / tag_all.php ' ) ;
- } else if ( get_query_var ( "tag" ) != "" ) { ) 他の人の場合 ( get_query_var ( "タグ" ) ! = " " ) (
- ultimate_get_posts ( ) ; ultimate_get_posts ( ) ;
- if ( is_feed ( ) ) { 場合 ( is_feed ( ) ) (
- return ; 復帰 ;
- } )
- if ( file_exists ( TEMPLATEPATH . "/tag.php" ) ) { もし ( file_existsは ( TEMPLATEPATH 。 " / tag.php " ) ) (
- if ( $_GET [ "feed" ] == '' ) { ( に$ _GET [ "が、 "フィード ] == '' ) (
- include ( TEMPLATEPATH . '/tag.php' ) ; ( TEMPLATEPATH含まれています。 ' / tag.php ' ) ;
- } )
- } else { する) else (
- // include(TEMPLATEPATH . '/index.php'); / / ( TEMPLATEPATH含まれています。 ' / index.phpを' ) ;
- } else { する) else (
- include ( TEMPLATEPATH . '/tags.php' ) ; ( TEMPLATEPATH含まれています。 ' / tags.php ' ) ;
- } )
- } )
- } )
You may need to have file tags.php in your theme directoryあなたのテーマのディレクトリにファイルがtags.phpする必要があります
Here is example of tags.phpここtags.phpの例です。
- <?php get_header ( ) ; ?> < ? phpの get_header ( ) ; ? >
- <div class = "primary" > <div クラス = "primary" >
- <?php UTW_ShowWeightedTagSetAlphabetical ( "coloredsizedtagcloud" , "" , 0 ) ?> < ? phpの UTW_ShowWeightedTagSetAlphabetical ( " coloredsizedtagcloud " 、 " " 、 0 ) ? >
- </div> < / divを>
- <?php get_sidebar ( ) ; ?> < ? phpの get_sidebar ( ) ; ? >
- <?php get_footer ( ) ; ?> < ? phpの get_footer ( ) ; ? >
You also can change function or parameters to display tag in the page as you want.また、必要に応じ、ページ内のタグを表示する関数やパラメータを変更することができます。 Please see all detail here UltimateTagWarrior helpここUltimateTagWarriorに役立つすべての詳細を参照してください
February 24th, 2007 at 10:35 pm 2月24日2007 10:35午後
Another Day, Another Post… アナザーデイ、もう一つのポスト...
[...] While surfing aimlessly today I came across this site: [...]… [...]は、当てもなく、今日私はこのサイトに遭遇したサーフィン: [...] ...