Adding PHP to a DIV
-
This might be a stupid question but I just can’t figure it out. I want to add some PHP to a DIV inside my custom theme. Everytime I add the code inside a DIV it jumps out.
Link to page:
http://reinowo58.fiftyeight.axc.nl/hoe/As you can see on the right side there are 2 divs. I added a piece of PHP to the container that grabs the latest post. But it appears outside the DIV.
This is the code:
<div style="width: 250px; height: 325px; background-color: #ebecec; border-radius: 25px; padding: 25px;"> <div style="width: 170px; height: 40px; background-color: #fb3099; border-radius: 18px; margin-left: auto; margin-right: auto; text-align: center;"> <h2 style="padding-top: 14px;">NIEUWS</h2> </div> [insert_php] query_posts('showposts=1'); [/insert_php] [insert_php] while (have_posts()) : the_post(); [/insert_php] [insert_php] endwhile;[/insert_php] </div>As you can see on the page the text is on the bottom of the page instead of inside the DIV. Please help me out with this one.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Adding PHP to a DIV’ is closed to new replies.