Yes that’s possible, you can use conditional statements to do this:
http://codex.wordpress.org/Conditional_Tags
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?
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.
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
@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.