page&post in index
ok , i change this on my api file , that's ok, into the admin page, it's working.
when i put :
into my home.php , he say :
when i put :
Code: Select all
<?php
$url = 'http://www.rotaryclub-balma.fr/api/show/page/notrehistoire';
$jsonData = file_get_contents($url);
$data = json_decode($jsonData, true);
foreach($data as $page) {
echo $page['title'];
echo '<br>';
}
?>
Code: Select all
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
n
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
N
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
<
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
<
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
Notice: Uninitialized string offset: 0 in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
2
Warning: Illegal string offset 'title' in /home/vivreune/www/rotaryclub-balma/bl-themes/pure/php/home.php on line 64
h
The foreach code is when you have more than 1 page or post, in the case of 1 post or page try this:
Code: Select all
<?php
$url = 'http://www.rotaryclub-balma.fr/api/show/page/notrehistoire';
$jsonData = file_get_contents($url);
$data = json_decode($jsonData, true);
echo $data['title'];
?>
Hi,
here is a little tutorial to do it, https://docs.bludit.com/en/misc/embed-b ... my-website
You need to have Bludit v1.4 and the plugin API enabled.
here is a little tutorial to do it, https://docs.bludit.com/en/misc/embed-b ... my-website
You need to have Bludit v1.4 and the plugin API enabled.