i'm creating a wordpress plugin for wordpress. In the beginning, i had been accounting using the default configurations, in which the Link to a publish could be
http://localhost/worpress/?p=123, and that i was requesting is_single() within the
When my wordpress plugin was ready, i went to try and cleanup my code. You will find (a minimum of) a couple of things that i am getting wrong:
- How come it return false, after i request for
initaction or something like that earlier than
- Why, after i consider using a var_dump($_REQUEST) (or _Publish, or _GET) any place in my page cycle, i recieve a clear array, after switching the permalink choices to url_friendly type?
Can anybody shed an easy about this, please?
is_single()is only going to return
trueif you're on one publish
initaction hook happens really at the start of the cycle should you call
is_singleprior to the Wordpress_Totally instantiated you will get false.
To determine whether you are calling
is_single too soon set
define('WP_DEBUG', true); in
wp-config.php. This really is online 81 of my version of wordpress-config. You will notice a mistake message from WordPress if you are calling it too soon. (Plus it is a good tool to make use of throughout development.)
You are not receiving
$_REQUEST parameters after switching to friendly URL's because friendly Web addresses do not have a querystring (the title/value pairs that occur following the question mark in something similar to
http://localhost/worpress/?p=123.) Observe that
http://localhost/worpress/foo/bar does not possess a question mark.