How To Create Dynamic Routes In WordPress

  Рет қаралды 17,758

WPCasts

WPCasts

Күн бұрын

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

Пікірлер: 70
@WPCasts
@WPCasts 3 жыл бұрын
Hope you learned something! Make sure to follow me on Twitter: twitter.com/AlexanderBYoung
@alvinolavarrieta
@alvinolavarrieta 12 күн бұрын
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 😉
@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
@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 11 ай бұрын
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.
@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. 😄
@hermanchan6260
@hermanchan6260 Жыл бұрын
This is exactly what I was looking for, thank you Alex.
@bsevo
@bsevo Жыл бұрын
This was super useful! And you explained it in a simple, easy understandable way! :)
@cbee402
@cbee402 2 жыл бұрын
Gob and Tobias? i wonder if anyone else caught the A.D reference 😄😄 great work btw
@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?
@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?
@tamarayee
@tamarayee 2 жыл бұрын
Thanks so much! This is exactly what I needed!
@megameketref
@megameketref 2 жыл бұрын
Thanks, this video was very helpful !
@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.
@paur.1469
@paur.1469 2 жыл бұрын
Thanks you so much for such an amazing video!
@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.
@everybot-it
@everybot-it 3 жыл бұрын
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
@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.
@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?
@barbaral.7326
@barbaral.7326 3 жыл бұрын
Thank you so much for that video, its really helpful!!
@marcitrixie
@marcitrixie 3 жыл бұрын
nice video. but can i edit permalink structure on edit page or post type?
@tamtranminh9968
@tamtranminh9968 11 ай бұрын
Thanks so much my friend
@AbdiasVrech
@AbdiasVrech 3 жыл бұрын
You rock man! super easy to understand
@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
@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.
@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.
@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();
@hadesunseen6388
@hadesunseen6388 4 ай бұрын
thank you for sharing
@tecs77
@tecs77 Жыл бұрын
Big big thanks 🍎
@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?
@ahmad-ali14
@ahmad-ali14 3 жыл бұрын
That's very helpful, 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
@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.
@theman7050
@theman7050 2 жыл бұрын
Isnt 'template_include' supposed to be a filter and not an action?
@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!
@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?
@clareivers
@clareivers 3 жыл бұрын
Thanks so much, this is awesome
@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.
@alexlytle089
@alexlytle089 3 жыл бұрын
Thank you
@yeltsinreyes672
@yeltsinreyes672 3 жыл бұрын
And if I don't want to get_header() or get_footer() I can do an include() and then die()?
@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 🙏🙏🙏🙏🙏
3 жыл бұрын
What is the debug bar tool you are using ?
@joeyfest
@joeyfest 3 жыл бұрын
The worlds first analyst/therapist
@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?
@rayediaz
@rayediaz 3 жыл бұрын
This is AWESOME!
@tarunpatnayak9161
@tarunpatnayak9161 6 ай бұрын
How to create single and archive templates from data in custom db tables in wordpress??
@Joel-re1jz
@Joel-re1jz 2 жыл бұрын
Is there a way to restrict those routes to certain roles?
@nicolasortiz2416
@nicolasortiz2416 Жыл бұрын
GOAT
@fatenfayzo9730
@fatenfayzo9730 2 жыл бұрын
Hello, nice tutorial. How to use it with plugin
@beracode
@beracode 3 жыл бұрын
Good content man. keep it up
@WPCasts
@WPCasts 3 жыл бұрын
Thanks, will do!
@globdug8132
@globdug8132 3 жыл бұрын
I really would like to understand the down thumb.... By the way... thank you another great video! 🍻
@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.
@i--vik1007
@i--vik1007 3 жыл бұрын
How can I learn wordpress development fast? Kindly list it out.
@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
@generer
@generer 3 жыл бұрын
would WP rocket cache that code?
@fwdflashwebdesign
@fwdflashwebdesign 3 жыл бұрын
Good video
@sina-qh8wm
@sina-qh8wm 3 жыл бұрын
perfect ;)
@erichepperlewp
@erichepperlewp 11 ай бұрын
10:15 - Create *character.php* file
@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.
@030426101993
@030426101993 2 жыл бұрын
awesome
Simple Multilingual WordPress Site Setup with Polylang
18:01
3 Methods for AJAX in WordPress | Which Method is the Best?
23:09
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 30 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 108 МЛН
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Smart Sigma Kid #funny #sigma
00:14
CRAZY GREAPA
Рет қаралды 4,6 МЛН
Custom Queries In WordPress
14:50
WPCasts
Рет қаралды 20 М.
WordPress REST API Authentication: Application Passwords
14:34
LearnWebCode
Рет қаралды 54 М.
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 41 МЛН
The Basics of Dynamic Content in 15 Minutes
18:16
Rino de Boer
Рет қаралды 183 М.
How To Create A Shortcode | WordPress Development Tutorial
13:08
WP REST API - Custom Endpoints
14:00
Watch and Learn
Рет қаралды 79 М.
WordPress Interactivity API Tutorial & Explanation
1:57:13
LearnWebCode
Рет қаралды 8 М.
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 30 МЛН