Тёмный

How To Create Dynamic Routes In WordPress 

WPCasts
Подписаться 30 тыс.
Просмотров 18 тыс.
50% 1

In this video, we go over how to creat a dynamic route in WordPress
Code: github.com/ale...
My favorite caching plugin - WPRocket: wpcasts.tv/go/...
💖 Become a Patron to show support & get perks!
/ wpcasts
Sign up for the newsletter. Free course coming soon:
wpcasts.tv
*SOCIAL*
Twitter: / alexanderbyoung
Facebook: / wpcasts.tv

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 70   
@WPCasts
@WPCasts 3 года назад
Hope you learned something! Make sure to follow me on Twitter: twitter.com/AlexanderBYoung
@StevanGeorge
@StevanGeorge 3 года назад
Seriously, this is not a regular tutorial, this is really advanced and super informative. I've think about this awhile ago, but couldn't find the tutorial elsewhere. Big thanks Alex.
@WPCasts
@WPCasts 3 года назад
Glad it was helpful!
@Gyana.Ranjan
@Gyana.Ranjan 11 месяцев назад
@@WPCasts this is really informative . Looking for this information for months tried chatGPT, claude, bard and finally you gave the solution. Thank you For the Video
@alvinolavarrieta
@alvinolavarrieta 3 дня назад
Very helpful. I'm using this setup to receive webhook response and its an easy way to get dynamic routes for many use cases. We should have more videos of these odd implementations 😉
@chaz6399
@chaz6399 Год назад
Thank you. Super helpful video. I got a simple example working in no time and now I'm moving on to my desired implementation, which is to create a downloadable ICS file. My first ICS implementation generated the ICS file on the client using JS. Shortly after that I added creation of an equivalent ICS file on the server to be sent as an attachment to an alert email. I didn't like having two different implementations for the same ICS file, so I'm deprecating the client side generation and replacing it with a hyperlink to a dynamic route that generates the ICS file using the same code as the email alert. Sweet! I didn't expect this to be so clean. Thanks again!
@markshergold5295
@markshergold5295 2 года назад
You are a legend sir. This has been bugging me all day and not one person could solve the problem. This video has been legendary.
@erichepperlewp
@erichepperlewp 10 месяцев назад
Mind blown. Definitely advanced, but I love that you covered mistakes that one might make along the way.
@Daniel667
@Daniel667 3 года назад
Thanks for covering this! I will definitely make use of it.
@cbee402
@cbee402 2 года назад
Gob and Tobias? i wonder if anyone else caught the A.D reference 😄😄 great work btw
@jaied
@jaied 2 года назад
Well explained and made the complex topic easy and clear for beginners like me. Thanks for the video. Hope will get more WordPress tutorials from you. 😄
@bsevo
@bsevo Год назад
This was super useful! And you explained it in a simple, easy understandable way! :)
@Sonadob
@Sonadob 2 года назад
Thanks 🙏 this was a really good explanation of rewrite rules and query_vars. Perhaps you could do a follow-up with more deeper stuff about rewrite rules (with Costum Post Types and taxonomys used with the rewrite rules) and query_vars VS WP_Query.
@hermanchan6260
@hermanchan6260 Год назад
This is exactly what I was looking for, thank you Alex.
@codingzen869
@codingzen869 9 месяцев назад
Oh man! Why did you stop making these videos?!! I know this truck but still you make things do easy. Are you alright? It's a gem of a channel. Make more stuff if you are still there. I hope things are ok on your end.
@tejindersingh7935
@tejindersingh7935 2 года назад
I was trying to find out similar tutorial on the internet but could not find that but got your youtube video link. That's amazing. Really helpful. What is the difference if we have a page available with the rewrite structure? For example: characters ( page ) How to do rewriting on the above page with custom query variables?
@everybot-it
@everybot-it 2 года назад
I think you saved my project with this tutorial. I'll update you once I got the thing together. .... I'm still stuck trying to create MULTIPLE custom routes. I can't seem to wrap my head around the syntax in the functions.php yet
@marcitrixie
@marcitrixie 3 года назад
nice video. but can i edit permalink structure on edit page or post type?
@theaveragejoe89
@theaveragejoe89 3 года назад
Hey Alex, would you do a tutorial on custom post types data filtering using AJAX, by custom taxonomies of that post type. A real life scenario would be something like a hotel booking application, where you have multiple dropdown to select (probably different options of that post type i.e. location, price, no. of beds etc) and then filter and display the results on the same page.
@BarisPalabiyik
@BarisPalabiyik 3 года назад
It would be great. +1
@theman7050
@theman7050 2 года назад
Isnt 'template_include' supposed to be a filter and not an action?
@PaymanShamlu
@PaymanShamlu Год назад
Thnx for you great content I have two questions regarding the video: 1- what is the use of add rewrite tag? You didn't use it here. I just can't understand when is neseccary to employ the rewrite tag function 2- is this querying safe and secure? No further need for any sanitization?
@m_andrasch
@m_andrasch 2 года назад
Great video, thanks so much!!! 👏👏👏 Has anybody by chance a tutorial on how to combine this with breadcrumbs? I also needed to override the wordpress page title since WordPress somehow always used the startpage title.
@theman7050
@theman7050 2 года назад
Is this Tobias Funke based on a real person you know? I've seen youc se his name in another video as well :P By the way, the video content is AGAIN over the top, man. 👍🏼✌🏼 Thank you very much.
@tamarayee
@tamarayee 2 года назад
Thanks so much! This is exactly what I needed!
@emmanuelmnzava8966
@emmanuelmnzava8966 3 года назад
Awesome video/tutorial i have wanted to know how to create custom links for a while. Is it possible to flush out the permalinks programically ??
@rhinelandnagel7288
@rhinelandnagel7288 3 года назад
Yes it is use flush_rewrite_rules();
@AbdiasVrech
@AbdiasVrech 3 года назад
You rock man! super easy to understand
@globdug8132
@globdug8132 3 года назад
I really would like to understand the down thumb.... By the way... thank you another great video! 🍻
@megameketref
@megameketref 2 года назад
Thanks, this video was very helpful !
@kokngonose
@kokngonose 7 месяцев назад
thank you for the video, i want ask to its not related to wordpress but , i saw in your video in 15:12 you say thank you and the like button glow up, is there new youtube feature?
@tamtranminh9968
@tamtranminh9968 10 месяцев назад
Thanks so much my friend
@paur.1469
@paur.1469 2 года назад
Thanks you so much for such an amazing video!
@jdzreacts836
@jdzreacts836 Год назад
Hello, thanks for this. This video is very helpful to me, but is there a way to record that 'route' to analytics like jetpack, koko, etc? It only records the page but not the specific character. I would like to see which characters are popular and not.
@MultiPitshou
@MultiPitshou Год назад
Thanks for the Tuts. I tried to rewrite and it worked but my problem is with the flushing of rewrite rules. I tried doing on plugin activation but it doesn't work. Any idea on how to go about?
@barbaral.7326
@barbaral.7326 3 года назад
Thank you so much for that video, its really helpful!!
@hadesunseen6388
@hadesunseen6388 4 месяца назад
thank you for sharing
@okuz456
@okuz456 Год назад
Hey! It works great with the child pages, like "/characters/*name*". However any ideas how to make the parent page work "/characters"? Anyway thanks for the tutorial!
@PossessWithin
@PossessWithin 3 года назад
Do you have any full paid courses? I'm primarily a Javascript developer just getting into WP now, I'd like to learn from you.
@tecs77
@tecs77 Год назад
Big big thanks 🍎
@elabinnovations
@elabinnovations 2 года назад
Thanks I want set custom content-type also. How is that possible i.e, When a user visits /svg/:MyName Then it return a dynamic svg image containing MyName data with content-type:image/svg+xml
@yeltsinreyes672
@yeltsinreyes672 3 года назад
And if I don't want to get_header() or get_footer() I can do an include() and then die()?
@InstaSound
@InstaSound 3 года назад
get_query_var is always "" for me within the add_action block. It only contains the data when within the actual page template, so the logic doesn't work.
@hermanchan6260
@hermanchan6260 Год назад
Hi all, I followed what Alex did and was able to implement it. But now my question is how do you implement multiple rewrite rules? In this example, you allow dynamic path ".../character/..." to redirect users to character.php, what if you also want to simultaneously allow dynamic path "..../character2/..." to redirect users to character2.php? How do you differentiate in the template_include action?
@tarunpatnayak9161
@tarunpatnayak9161 6 месяцев назад
How to create single and archive templates from data in custom db tables in wordpress??
@ahmad-ali14
@ahmad-ali14 3 года назад
That's very helpful, thanks
@tochukwuokafor1251
@tochukwuokafor1251 2 года назад
Thanks for the insight. Please how can I apply it to create an invitation link for users to activate their accounts after the admin has created an account for them? I need answers everybody 🙏🙏🙏🙏🙏
@joeyfest
@joeyfest 3 года назад
The worlds first analyst/therapist
@clareivers
@clareivers 3 года назад
Thanks so much, this is awesome
@fatenfayzo9730
@fatenfayzo9730 2 года назад
Hello, nice tutorial. How to use it with plugin
@alexlytle089
@alexlytle089 3 года назад
Thank you
3 года назад
What is the debug bar tool you are using ?
@rayediaz
@rayediaz 3 года назад
This is AWESOME!
@DeadWavesStudio
@DeadWavesStudio 3 года назад
Could someone explain how to do an api query and pass values to the themes default post template? Like title and content.
@Joel-re1jz
@Joel-re1jz 2 года назад
Is there a way to restrict those routes to certain roles?
@i--vik1007
@i--vik1007 3 года назад
How can I learn wordpress development fast? Kindly list it out.
@beracode
@beracode 3 года назад
Good content man. keep it up
@WPCasts
@WPCasts 3 года назад
Thanks, will do!
@kevintanudjaja8893
@kevintanudjaja8893 3 года назад
can you pass the api response to elementor, so that we don't have to echo it manually? I mean can we use page builder to use data from api response?
@DeadWavesStudio
@DeadWavesStudio 3 года назад
elementor supports dynamic content out of the box
@juliansruiz
@juliansruiz 3 года назад
I love the video and the explanations. I keep getting a 404 error when I visit a link. Swapping out "characters" for "jobs" for a Careers page, and even echoing out "Im the job page" doesn't display with your code copied/pasted. I noticed there isn't an index.php file in this child theme so I swapped category.php for index.php in your add_rewrite_rule function; and also tried creating an index.php file while utilizing the code you have, but it still sent a 404 page. Any possible clue as to why I might not be connecting the page properly?
@generer
@generer 3 года назад
would WP rocket cache that code?
@laxmiprasanna4092
@laxmiprasanna4092 3 года назад
Please make a complete wordpress course on udemy or youtube. There is not many tutorials about that. Most of them are using page builders. People are forgetting to code with wordpress. That is not good.
@erichepperlewp
@erichepperlewp 10 месяцев назад
10:15 - Create *character.php* file
@fwdflashwebdesign
@fwdflashwebdesign 3 года назад
Good video
@nicolasortiz2416
@nicolasortiz2416 Год назад
GOAT
@sina-qh8wm
@sina-qh8wm 3 года назад
perfect ;)
@030426101993
@030426101993 2 года назад
awesome
Далее
这位大哥以后恐怕都不敢再插队了吧…
00:16
Custom Queries In WordPress
14:50
Просмотров 20 тыс.
The Basics of Dynamic Content in 15 Minutes
18:16
Просмотров 182 тыс.
Astro + WPGraphQL for more secure WordPress sites
14:04
Introduction to JavaScript in WordPress
19:50
Просмотров 20 тыс.
WP REST API - Custom Endpoints
14:00
Просмотров 79 тыс.