i'm trying to insert a include_once inseide a echo do_shortcode and my line is this:
<?php $activar = get_option("activar-pelicula"); ?>
<?php
if ($activar == "true") {
echo do_shortcode('[to_like]' .include_once "includes/single/player.php"; . '[/to_like]');
} ?>
this is the error i'm getting:
Warning: include_once(includes/single/player.php[/to_like]): failed to open stream: No such file or directory in /home/novosfil/public_html/wp-content/themes/grifus/single.php on line 8
Warning: include_once(): Failed opening 'includes/single/player.php[/to_like]' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/novosfil/public_html/wp-content/themes/grifus/single.php on line 8
I'm trying to get this line (original line)
<?php
$activar = get_option("activar-pelicula");
if ($activar == "true") {
include_once "includes/single/player.php";
} ?>
inside the locker with this
<?php
echo do_shortcode('[to_like]' HER GOES THAT PART OF THE PAGE '[/to_like]');
} ?>
ok that's it. Tnks in advance
you can try this way:
<?php $activar = get_option("activar-pelicula"); ?>
<?php
if ($activar == "true") {
ob_start();
include_once "includes/single/player.php";
$out1 = ob_get_contents();
ob_clean();
echo do_shortcode('[to_like]' . $out1 . '[/to_like]');
} ?>