Display of Wordpress pages

Asked

Viewed 95 times

0

I’m in need of a help here about pages and display with Wordpress. I have to make a website for a service provider, and that company has two branches in different cities, and each city has its corresponding plan. When entering the site you have to open a page asking to select the city, when selecting you will be directed to the corresponding page of the city that will show the plans of the services provided in that city. And within these plans there are 2 types, which are Residential Services and Business Services, how do I show each one on their respective page? For example, if I select city X, show only the plans of that same city and select the type of service show only the respective type?

I started with Post Type and Taxonomy Type. I created a City Taxonomy and another Service Type. I created a post type for the respective plans, when registering the plan you can select a city. When I enter the site ask which city I want, then when selecting City X directs to the respective page, but through this page (www.site.com/city/Newyork) I select the page of plans, I miss the reference of which city I chose and displays all registered plans. (www.site.com/plans)

I would like it to be (www.site.com/city/Newyork/plans or www.site.com/city/Paris/plans)

Thank you!

  • Does it have to be only with WP tools? There is a way you can do Avascript on the page, with the text editor, it serves?

1 answer

1

So, man, your question got a little long and confusing... But if you want to work with pages in wordpress, recommend that you use the pattern of templates for different pages, example: I want to create a page that will differentiate a lot from my theme, so what I do?

  • Create a page in the folder of your theme: "sao_paulo.php"
  • In the first line you define that it will be a "new template":

     <?php
     /**
     * Template Name: São Paulo
     */
     ?>
    

    with this, wordpress already knows that there is a new page pattern.

  • After we create a page template, we will call it in the creation of a new page: Sign in to the administrator("/wp-admin") "Pages > Add New", Enter the name and in the "Template" part Select the template you created(São Paulo).

Okay, you can program on this page(.php), which will appear in WP. This is good when you want to do more complex programming working together with the WP cods. I know I haven’t fully answered your question, but I hope I’ve helped. See you!

Browser other questions tagged

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