使用Wordpress插件根據自定義分類標準對自定義帖子類型進行排序。結果將在帖子類型的歸檔頁面上返回。排序是偉大的工作,但遭到阻攔試圖與多個分類項目顯示標題內容:基於strstr的多個url值的內容可見性?
<?php if(strstr($_SERVER['REQUEST_URI'], "level/invigorating")) { ?>
<h3>These poses are invigorating:</h3>
<?php } ?>
<?php if(strstr($_SERVER['REQUEST_URI'], "level/invigorating/position/seated")) { ?>
<h3>These poses are invigorating and seated:</h3>
<p>For positions of this nature please take care of your sacrum.</p>
<?php } ?>
<?php if(strstr($_SERVER['REQUEST_URI'], "position/seated")) { ?>
<h3>These poses are seated:</h3>
<?php } ?>
"level/invigorating/position/seated"
返回下面的三個h3
的,因爲所有的if
的迴歸真實。
我的PHP技巧很糟糕,試圖理解手冊就像盯着夜空。
這怎麼寫,所以每頁只能返回一個值?可能this screenshot幫助。使用Beautiful Taxonomy Filters。
我不知道我理解這個問題的權利,但我會建議作出自定義後鍵入https使用WordPress的層次://developer.wordpress.org/files/2014/10/template-hierarchy.png – meck373
謝謝!我相信模板工作正常。我可能可以忽略關於帖子類型和分類法的所有內容,但我想解釋這些網址。 – shipwreck