Hello everyone,
I have a basic knowledge of PHP. I can get by with includes.
I am modifying a WordPress website for a client.
The client wants a video player displayed in the website, which is fine. There is an include there for the video player.
WordPress is made up of several PHP files.
In the header file: I’ve placed this code:
<?php if ( is_page(‘7’) ) { ?>
<?php include(‘videoplayer.php’); ?>
<?php } else { ?>
<?php } ?>
Which means on page 7 of the wordpress site displayed the content of the video player. In the video player.php file there is a title and breadcrumb.
In the image attached you can see I have a duplicate title and brumbcrumb, the title and breadcrumb below the video player needs to be removed. I am curious how to apply an if statment to this.
Here is the code I’ll need to change to apply the if statement.
Any help will be greatly appreictated.
<?php
// the title
if (strpos(get_the_title($post->ID), ‘//’)) {
$thisTitle = ‘<strong>’ . str_replace(‘//’, ‘</strong> // ‘, get_the_title($post->ID));
}else {
$thisTitle = ‘<strong>’. get_the_title($post->ID) .’</strong>’;
}
?>
<!-- Title / Page Headline –>
<div class=“full-page”>
<h1 class=“headline”><?php echo $thisTitle; ?></h1>
</div>
<div class="hr"></div>
<!-- Breadcrumbs -->
<div class="full-page">
<p class="breadcrumbs">
<?php show_breadcrumbs(); ?>
</p>
</div>
<!-- End of Content -->
<div class="clear"></div>
What I am trying to do is to place if statement that if page is = 7 appears I’d like no post title and no breadcrumbs please.
This code just above is included in the videoplayer, you will see with the image shown.
Many many thanks