You can write that kind of thing into your theme but I’m not sure what you mean by adding the function “to a picture”.
Thread Starter
aslamp
(@aslamp)
I want a different picture to show in every page. 1 picture in home. 1 picture in contact, one picture in about etc.
http://vetech.no/wp/?page_id=148
The image above the page content is now the same on every page. I would like it to show one picture if page_id=148 and another picture if ?page_id=18.
Thread Starter
aslamp
(@aslamp)
at the moment this div defines the picture under the menu.
<div class=”bilde2″></div>
I tryed this code, but that just crashed the site. It might give you and idea about what im after 🙂
<?php
if ($page_id="18")
echo "<div class="bilde2"></div>";
elseif ($page_id="147")
echo "<div class="bilde3"></div>";
else
echo "<div class="bilde4"></div>!";
?>
Thread Starter
aslamp
(@aslamp)
After alot of php reading i made this code and it worked 🙂
So if anyone else have the same proble just use this :
<?php
if(is_page(‘148’))
echo ‘<div class=”bilde2″></div>’;
elseif(is_page(’18’)):
echo ‘<div class=”bilde3″></div>’;
else:
echo ‘<div class=”bilde4″></div>’;
endif;
?>