593 reputation
517
bio website ianchanning.wordpress.com
location Belgium
age 36
visits member for 4 years, 2 months
seen May 10 at 23:46

Monkey coder no. 76540


Jun
11
comment home_url on IIS missing permalink index.php
Yes - the code does get ugly, which is why I switched to modifying the site address which works much better. I only use it as they do use $is_iis7 in the source of the iis_supports_permalinks function.
Jun
10
answered home_url on IIS missing permalink index.php
Jun
10
comment home_url on IIS missing permalink index.php
Ah following on from your Adam Brown database I spotted this function iis7_supports_permalinks.
Jun
10
comment home_url on IIS missing permalink index.php
Thanks for this - I was hoping for an internal WP function along the lines of base_permalink_url or some sort, but for a custom bit of code this would definitely be the neatest solution. I think that home_url normally leaves off the end slash, so the slash should be the other side of index.php i.e. return $url . '/index.php';
Jun
10
revised home_url on IIS missing permalink index.php
added 170 characters in body
Jun
10
asked home_url on IIS missing permalink index.php
Jun
6
comment Using a database view = evil incarnate?
Ok, I see what you mean. Thank you for the excellent help :)
Jun
6
comment Using a database view = evil incarnate?
Ah - do you just mean use the functions in export.php? That only seems to be for posts.
Jun
6
comment Using a database view = evil incarnate?
I've been searching for the export API but can't find exactly what you mean. I can see that the Contact Form 7 plugin clearly does it correctly as it adds an extra 'Contact Forms' option to the list of possible exports in Tools > Export.
Jun
6
accepted Using a database view = evil incarnate?
Jun
5
asked Using a database view = evil incarnate?
Apr
21
awarded  Necromancer
Mar
14
awarded  Yearling
Feb
6
awarded  Popular Question
Dec
27
revised Add Role inherits?
corrected spelling, corrected some grammar as my spelling corrections weren't enough
Dec
27
suggested approved edit on Add Role inherits?
Dec
27
accepted Variable use in get_template_part
Dec
13
awarded  Self-Learner
Jun
10
comment Saving fields in a drop-down in Wordpress
As @Stephen Harris says - you're not setting the $template value. Try putting this at the top of your function: $template = $post->page_template;
Jun
10
comment Saving fields in a drop-down in Wordpress
If as you say your default template gets updated in the database correctly - then when you refresh the page then you should have the text of the selected template in the $template variable. Have you tried printing out the $template variable to see what's in it?