Opened 8 years ago
Closed 5 years ago
#42273 closed defect (bug) (worksforme)
Template_url calls index pge
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.8.2 |
| Component: | Themes | Keywords: | reporter-feedback close |
| Focuses: | template | Cc: |
Description
get_bloginfo("template_url")
When i use the function with these arguments
The function calls index.php and then return the url
So u can fix that by stop calling index
Test the code with
Mkdir() << inside index.php
Then use the function in page.php or single.php template
And see!.
Hope u credit me for this bug
Wasim .
Change History (7)
#3
follow-up:
↓ 4
@
8 years ago
I'm not sure I see the issue, get_bloginfo( 'template_url' ) calls get_template_directory_uri(), which works in all templates and does not depend on index.php in any way.
#4
in reply to:
↑ 3
;
follow-up:
↓ 5
@
8 years ago
Replying to SergeyBiryukov:
I'm not sure I see the issue,
get_bloginfo( 'template_url' )callsget_template_directory_uri(), which works in all templates and does not depend onindex.phpin any way.
It calls index.php in the template
Tou can create empty index.php with function like mkdir
Then get_bloginfo with template _url
U can see it will calls index.php and create a folder
#5
in reply to:
↑ 4
@
8 years ago
Replying to wassimo:
Tou can create empty index.php with function like mkdir
Then get_bloginfo with template _url
U can see it will calls index.php and create a folder
WordPress loads index.php as a part of the template hierarchy. If I put a mkdir() call there, it would always be executed, with or without get_bloginfo( 'template_url' ). I don't see a bug here.
Hello @wassimo, welcome to WordPress Trac!
Does it still happen with all plugins disabled and a default theme activated?