Blank page after including php code into my .php file
-
Hello guys,
Note: I managed to show my content generated by my php file into my “Reviews”-page. I basically added the HTML code from the “Reviews”-page into my “reviews.php”-file. But here is the next problem: The CSS is not shown. Should I add the CSS with an <link> tag into my php file? I think, my php file (which will include php, html and css) will be to bloated.
I’ll keep it short:
– I created a WordPress page “Reviews”, this page includes HTML code (+CSS from a plugin)
– I created a PHP file “reviews.php”, which includes PHP code, loops, variables etc.
– In myreviews.php
I added on the very beginning<?php /* Template Name: reviews */ ?>
to have access to this file via page attributes. Accordingly
the template “reviews” appears there, all fine.I assumed if I view the preview of the page “Reviews” I’ll see the page like I have on my local machine. But what I see is a blank page. Nothing in.
Do you guys have an idea?
Thanks a lot. I already worked with WP, but this task is a bit more difficult. Seems like.
- The topic ‘Blank page after including php code into my .php file’ is closed to new replies.