2017-05-19 37 views
0

我有一個WordPress(4.7.5)設置並嘗試將一些URL參數傳遞到着陸頁。WordPress網址參數與&字符導致404

/landingpage/?ID=1779 - 按預期工作

/landingpage/?ID=1779&name=james - 導致404錯誤頁面

/landingpage/?ID=1779&name=james&company=microsoft - 導致404錯誤頁面

我的問題是,爲什麼在 '&' 結果404我該如何解決這個問題?

謝謝你的任何輸入x

回答

0

你的問題是不是在你的網址「和」。但它是查詢參數「名稱」。更改是更獨特的東西,因爲WordPress的默認查詢參數,你不應該在自定義查詢中使用。

波紋管是默認的wordpress查詢變量,你不能使用。

Array 
(
    [error] => 
    [m] => 
    [p] => 0 
    [post_parent] => 
    [subpost] => 
    [subpost_id] => 
    [attachment] => 
    [attachment_id] => 0 
    [name] => 
    [static] => 
    [pagename] => 
    [page_id] => 0 
    [second] => 
    [minute] => 
    [hour] => 
    [day] => 0 
    [monthnum] => 0 
    [year] => 0 
    [w] => 0 
    [category_name] => 
    [tag] => 
    [cat] => 
    [tag_id] => 
    [author] => 
    [author_name] => 
    [feed] => 
    [tb] => 
    [paged] => 0 
    [meta_key] => 
    [meta_value] => 
    [preview] => 
    [s] => 
    [sentence] => 
    [title] => 
    [fields] => 
    [menu_order] => 
    [embed] => 
    [category__in] => Array 
     (
     ) 

    [category__not_in] => Array 
     (
     ) 

    [category__and] => Array 
     (
     ) 

    [post__in] => Array 
     (
     ) 

    [post__not_in] => Array 
     (
     ) 

    [post_name__in] => Array 
     (
     ) 

    [tag__in] => Array 
     (
     ) 

    [tag__not_in] => Array 
     (
     ) 

    [tag__and] => Array 
     (
     ) 

    [tag_slug__in] => Array 
     (
     ) 

    [tag_slug__and] => Array 
     (
     ) 

    [post_parent__in] => Array 
     (
     ) 

    [post_parent__not_in] => Array 
     (
     ) 

    [author__in] => Array 
     (
     ) 

    [author__not_in] => Array 
     (
     ) 

    [ignore_sticky_posts] => 
    [suppress_filters] => 
    [cache_results] => 1 
    [update_post_term_cache] => 1 
    [lazy_load_term_meta] => 1 
    [update_post_meta_cache] => 1 
    [post_type] => 
    [posts_per_page] => 10 
    [nopaging] => 
    [comments_per_page] => 50 
    [no_found_rows] => 
    [order] => DESC 
)