Ik ben bezig met het maken van een wordpressblog, maar ik wil gewoon me eigen website zonder een wordpress layout. Dus ik laad de artikelen met behulp van een aantal functies in een andere pagina.
ik heb het bestand index.phpook heb ik het bestand junior.php
om het even te testen heb ik de zelfde code als index.php gebruikt
dit is te zien op http://csv.webatu.com/
Over index.php ben ik tevrede, de juiste informatie komt op die pagina in het juist format. Maar bij junior.php krijg ik een wit scherm, behalve de html. Er zit dus ergens iets fout in de php/wordpress, maar hoe kan dat want het is precies het zelfde. Het enige wat anders is is de bestand naam. Kan iemand mij helpen? Heeft iemand dit eerder gehad?
ik heb het bestand index.php
Spoiler tonen
<html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css"/>
<title>CSV - Nieuws</title>
</head>
<body>
<hr>
<b><a href="index.php">Nieuws</a> |
<a href="junior.php">Junioren Nieuws</a></b>
<hr><br />
<h1>Nieuws</h1>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require"]require[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]wordpress/wp-blog-header.php[/COLOR][COLOR= #007700]);[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR]have_posts[COLOR= #007700]()):[/COLOR] the_post[COLOR= #007700]();[/COLOR] ?>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] in_category[COLOR= #007700]([/COLOR][COLOR= #DD0000]nieuws[/COLOR][COLOR= #007700]) ) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div class=content>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h2>"[/COLOR][COLOR= #007700];[/COLOR]
the_title[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</h2><hr>"[/COLOR][COLOR= #007700];[/COLOR]
the_content[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</div>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<i>"[/COLOR][COLOR= #007700];[/COLOR]
the_time[COLOR= #007700]([/COLOR][COLOR= #DD0000]l j F Y[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" om "[/COLOR][COLOR= #007700];[/COLOR]
the_time[COLOR= #007700]([/COLOR][COLOR= #DD0000]H:i[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</i><br /><br />"[/COLOR][COLOR= #007700];
}[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]endwhile;[/COLOR] ?>
</body>
</html>om het even te testen heb ik de zelfde code als index.php gebruikt
dit is te zien op http://csv.webatu.com/
Over index.php ben ik tevrede, de juiste informatie komt op die pagina in het juist format. Maar bij junior.php krijg ik een wit scherm, behalve de html. Er zit dus ergens iets fout in de php/wordpress, maar hoe kan dat want het is precies het zelfde. Het enige wat anders is is de bestand naam. Kan iemand mij helpen? Heeft iemand dit eerder gehad?