Failed to place include in site with wordpress [closed]

-1

I have the address of a web radio and I would like it to work on the Wordpress website. I've put the code below into my header.php and this radio should appear as navbar at the top of the whole site.

<!-- Rádio Web -->
<?php include 'https://player.maxcast.com.br/comunidadedomdedeus';
?>
<!-- Rádio Web -->

Print error below:
link

    
asked by anonymous 10.12.2018 / 18:28

1 answer

1

The problem is that the include source is a full page and has scripts that will only work on the page itself. An include should be a page with just the required code and already rendered.

You can use an iframe, which will display the page independently:

<iframe src="https://player.maxcast.com.br/comunidadedomdedeus"></iframe>

InCSSyoucansetthepropertiesoftheiframe,suchaswidth,heightandborder:

iframe{border:none;width:100%;height:60px;}

Test:

iframe{
   border: none;
   width: 100%;
   height: 60px;
}
<iframe src="https://player.maxcast.com.br/comunidadedomdedeus"></iframe>
    
10.12.2018 / 20:41