tags:

views:

758

answers:

0

Hi, i've been googling for these information two days now but i haven't founud a complete solution. Hope some of you could give me some help, a good api or an example would be great.

I'm building a plugin for wordpress with a widget that displays some tags.

So i need to create a custom get parameter, let's call it 'mypar' and i'm able to generate the right link as with as without permalinks enabled with something like:

global $wp_rewrite;
$par = 'mypar';
$pagestruct = $wp_rewrite->get_page_permastruct();
 if ( '' != $pagestruct){
// permalinks
$link = get_settings('home') . "/$par/$val";
 } else {
link = get_settings('home') . "/?$par=$val";
}

than i get the parameter sent as from http://www.webopius.com/content/137/using-custom-url-parameters-in-wordpress

but this doesn't work when permalinks are enabled, i get the 404 page, is there a reason for that?

thanks for your help