Skip to main content

Timeline for How does routing on wordpress work?

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Apr 12, 2014 at 10:14 comment added Otto Alternatively, if you're making a theme for yourself and don't want to bother with making a portable plugin, you can make a "Page Template" in your theme, with your code in it, then make a new Page and tell it to use that special template. Templates are PHP, they can do anything they like.
Apr 12, 2014 at 10:09 comment added Otto You probably would not make a contact form store anything of the form itself in the database, you would code it as a plugin and have the logic for the form submission in the plugin. To output the special form code in a Page or Post, you define a shortcode.
Apr 12, 2014 at 10:08 answer added Otto timeline score: 36
Apr 12, 2014 at 10:08 comment added yeahman say I want to display a contact form.. i need to put my html in a page content type? I am still trying to find where to put the logic for the form submission... (in the theme page.php? very ugly approach)
Apr 12, 2014 at 10:07 comment added yeahman ok but this approach is a bit weird and not very flexible tbh
Apr 12, 2014 at 8:52 comment added user27457 May I suggests that you read about "the loop" which is the concept that you need to understand to know how WordPress works. Essential "the loop" displays an array of posts which is the result of query_posts. For non-admin URL requests WP is designed to show only posts and it takes custom programming to show something besides a post. Admin URL requests are different and these do not use "the loop" and show non posts things.
Apr 12, 2014 at 8:36 comment added Sisir Contents are saved as post in WP. So, when you need to show contents you need to query it
Apr 12, 2014 at 7:49 comment added yeahman digging in the code, i see on each request it calls query_posts? why on earth does it needs to query posts each time? isn't there cases where you don't actually want to display posts??
Apr 12, 2014 at 7:46 history asked yeahman CC BY-SA 3.0