Generate friendly URL with Wordpress and PHP (GET)

Asked

Viewed 20 times

0

Hello! I need to generate friendly Wordpress URL using GET method in conjunction with PHP. I have a database of registered events, and I want to generate URL with the event name instead of appearing the code and "? Cod=".

For example, instead of appearing www.meusite.com/event? Cod=1 Appear something like www.meusite.com/event/competition-between-friends

There is some specific plugin for this?

Thank you!

  • There is no way to hide the ID efficiently, if it was efficient the stackoverflow site itself would use, but look at the case of your question even, has the ID https://answall.com/questions/430647/gerar-url-amigável-com-wordpress-e-php-get, being like this https://answall.com/questions/<id>/<descrição>, unless you write a system from scratch that causes URL paths to be "UNIQUE" in the database and use this in Where in the query, but that would be to do something from scratch. In own wordpress you can configure the mode_rewrite without having to do in htaccess, have in meta panel (admin)

  • So Guilherme, if there is a way to do something like this in Wordpress, for example www.meusite.com/event/001/competition-between-friends competition would be better than using ? Cod=, so that I can dynamically generate these pages.

  • So see the answer I made in the other question, just follow the example of htaccess, Although who in Wordpress is just adjust in the own panel (meta login), It is much easier than in htaccess.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.