tbx_3001
Member
Posted 3 years ago #
Hi,
I have edited the page.php source code by adding something like this
<?php include("my-content.php"); ?>
Which the will "my-content.php" will show up on all of the pages.
Now I would like to only disable on a page 381. What is the php code to only disable it a this page?
if ($post->ID != 381) {
php include("my-content.php");
}
tbx_3001
Member
Posted 3 years ago #
What about pages? Not post.
I tried this:
<?php
if ($page->ID != 381) {
php include("my-content.php");
}
?>
But I got an error.
Thanks
umm, whats php include doing inside php tags?
neither of those are going to work
<?php
if ($page->ID != 381) {
include("my-content.php");
}
?>
tbx_3001
Member
Posted 3 years ago #
Does anyone know the solution to this?
I edited this file "page.php" and added the php include below.
<?php include("my-content.php"); ?>
But on page id 381 I dont want it to show up.
Thanks.