Title: Dynamic Pages
Last modified: August 19, 2016

---

# Dynamic Pages

 *  [ulozilla](https://wordpress.org/support/users/ulozilla/)
 * (@ulozilla)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/)
 * Is it possible to create dynamic pages on wordpress?, for example i create a 
   country page , but inside the page i ask something like “if page is USA then 
   show this photo and this query”
 * I want to try this cause if i can’t do it, i’m gonna have to use a template for
   every page.
 * thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Christine Rondeau](https://wordpress.org/support/users/crondeau/)
 * (@crondeau)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/#post-2031219)
 * Yes that’s possible, you can use conditional statements to do this:
 * [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
 *  Thread Starter [ulozilla](https://wordpress.org/support/users/ulozilla/)
 * (@ulozilla)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/#post-2031226)
 * thanks for the answer Christine, another question, if i have 25 country pages,
   i need to ask 25 times for different countries? or there’s a simpler way to do
   it?
 *  [Christine Rondeau](https://wordpress.org/support/users/crondeau/)
 * (@crondeau)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/#post-2031232)
 * I think I need to know a bit more details about what it is that you’re trying
   to do.
 * You could set up countries as a taxonomy or categories and then use that logic,
   but you will have to make a lot of queries yes.
 *  [transom](https://wordpress.org/support/users/transom/)
 * (@transom)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/#post-2031237)
 * Alternately, you could use the page slug to pull up the right image. In your 
   page.php file, you could include something like this inside the loop:
 *     ```
       <?php
       global $post;
       $page_name = $post->post_name;
       ?><img src="<?php bloginfo('template_url'); ?>/images/<?php echo $page_name;? >.jpg" />
       ```
   
 * will insert an image with the page_slug name(.jpg) from the images folder in 
   the theme directory
 *  Thread Starter [ulozilla](https://wordpress.org/support/users/ulozilla/)
 * (@ulozilla)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/#post-2031378)
 * [@transom](https://wordpress.org/support/users/transom/) that sounds very interesting.
   
   Christine what i want to do is for example , have a general page for 1 continent“
   South America” , that homepage will have a menu, sidebar, some content and a 
   few pages(that will load the same menu). Then you have the country selector (
   Argentina, Chile, Peru, etc), on the country homepage you have a different menu
   and some articles related and a image(flag). The menu on the country homepage
   will change cause it will have country related content so the menu needs to know
   on which country i’m. Hope this explains a little bit my idea.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Dynamic Pages’ is closed to new replies.

## Tags

 * [dynamic pages](https://wordpress.org/support/topic-tag/dynamic-pages/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [ulozilla](https://wordpress.org/support/users/ulozilla/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/dynamic-pages-2/#post-2031378)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
