Zaffar Saffee
Zaffar Saffee

Reputation: 6305

creating pretty url for plug in wordpress?

as a learner, and a new one to wordpress, i am trying to learn how to make the urls look pretty,

i have installed wordpress on my localhost, and url of wordpress appear as

localhost/wordpress/ads/?adtitle=product-name

localhost/wordpress/index.php?jobid=100&jobtitle=job-name

and i want to make it the URL looks like

localhost/wordpress/ads/your-product-name/

localhost/wordpress/100/job-name/

SO FOR SO NOW, i am trying to grab the concepts, and read different stackoverflow answer and google for it, following some tutorial and googled code, What i am able to produce so for is..

function myruleszfr(){ 
add_rewrite_rule('^nutrition/([^/]*)/([^/]*)/?','index.php?p=12&food=$matches[1]&variety=$matches[2]','top');

}

add_filter( 'query_vars', 'zfr_query_vars' );
function zfr_query_vars( $query_vars )
{
    $query_vars[] = 'nutrition';
    return $query_vars;
}

     print_r(zfr_query_vars( $query_vars ));

as I am a learner, and i am trying to learn the process, can somebody guide me to the process that how should i modify the existing code to make my URL pretty? can some body guide me please?

Upvotes: 0

Views: 245

Answers (1)

Milap
Milap

Reputation: 7221

check out this one , its really simple and nice .

http://wordpress.org/extend/plugins/pretty-link/

Let me know if you have any query about it.

Good luck :)

Upvotes: 1

Related Questions