Viewing Wordpress pages

0

I need help here on pages and display with Wordpress. I have to make a website for a company to provide services, and that this company has 2 branches in different cities, and each city has its corresponding plan. When entering the site has to open a page asking to select the city, when selecting will be directed to the corresponding page of the city that will show the plans of the services rendered in that city. And within these plans have 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 city plans, and if I select the service type to show only the type of city?

I started doing with Post Type and Taxonomy Type. I created a Taxonomy City and another Type of service. I created a post type for the respective plans, when registering the plan can select a city. When I enter the site, it asks what city I want, so when I select City X, I go to the respective page, but through that page (www.site.com/city/NewYork) I select the plans page, I lose the reference of which city chose and displays all plans registered. (www.site.com/planos)

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

Thank you!

    
asked by anonymous 19.08.2015 / 15:44

1 answer

1

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

  • Create a page within your theme folder: "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 creating a page template, let's call it in the creation of a new page: Enter the admin ("/ wp-admin") "Pages > Add New", Enter the name and in the "Template" part Select the template you created (São Paulo).

You can now program this page (.php), which will appear in WP. This is fine when you want to do more complex programming working along with the WP codes. I know I did not fully answer your question, but I hope I have helped. See you!

    
20.08.2015 / 16:32