I'm wondering if I'm doing something wrong, or if there is more settings to use pretty url's….
For example my program page has the url (simply in a page named “program-2011″ )
/program-2011
all good, but when I click on a speaker name it brings to
/program-2011/?subject=lineup&_year=2011&artist=2
is there a way to improve or customize the way it looks ?
I specially get rid of “artist” that my clients will not like for this project, guess I can do that by looking for the parameter passed with the plugin…. but indeed I'll prefer a
Post edited 12:24 pm – December 12, 2011 by Top Quark
Hi Julien,
Unfortunately at this time, that’s what the URLs look like. I don’t have pretty speaker URLs in there. I’m in early planning stages on version two of this plugin which will actually make the speakers a custom post type. When that happens, we’ll get the pretty URLs. I don’t have plans on making pretty URLs before that.
I know, I hate those too. The “artist” is remnant code from when this plugin started as a way to manage performers for a music festival.
The URL is set as a $smarty template variable, so you could at least change it from artist= to speaker=, but then you’d need to do something in add_action(‘init’) to set $_GET['artist'] if $_GET['speaker'] is set. You could approach it like this:
add_filter(‘Smarty_Instance_resource_name’,'my_Smarty_resource_name’,10,2); function my_Smarty_resource_name($resource_name,$args){ $smarty = $args[0]; // a reference to the $smarty object
You can actually use the above filter to completely hijack a given Smarty template, in which case you could approach creating your own pretty url system. See http://topquark.com/blog/2011/…..ource_name for some info on that. But that seems like it might be a lot of work. I don’t know how much resources you have for this project.
Sorry I don’t have a better answer for you at this point. Version 2 is still months away.