Hi there,
I’ve just updated my neighborhoods theme, WordPress and Woocommerce. That’s works fine!
I have just one problem with Functions.php. I have a custom function (founded in a forum) which create an shortcode for import an entire page with the ID. Unfortunately, now, the code works but stop the page charging. here’s the following code :
And an exemple page :
http://www.n o r d k r a f t.fr/s/bagues/bike-chain-bague-argent-oxyde/
/**
* Create a shortcode to insert content of a page of specified ID
*
* @param array attributes of shortcode
* @return string $output Content of page specified, if no page id specified output = null
*/
function pa_insertPage($atts, $content = null) {
// Default output if no pageid given
$output = NULL;
// extract atts and assign to array
extract(shortcode_atts(array(
“page” => ” // default value could be placed here
), $atts));
// if a page id is specified, then run query
if (!empty($page)) {
$pageContent = new WP_query();
$pageContent->query(array(‘page_id’ => $page));
while ($pageContent->have_posts()) : $pageContent->the_post();
// assign the content to $output
$output = apply_filters( ‘the_content’, get_the_content() );
endwhile;
}
return $output;
}
add_shortcode(‘pa_insert’, ‘pa_insertPage’);
Thank you