gallery wont work while echo all $content on 1 page
-
Hi, I’m trying to activate the gallery on index page where I load all of my pages by script inside header.php:
(…)
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>><?php if ( is_home() ) {
$pages = get_pages( array(‘sort_column’ => ‘menu_order’) );
foreach ($pages as $page_data) {$content = apply_filters(‘the_content’, $page_data->post_content);
$title = $page_data->post_title;
echo $content;
}
} ?>Now it displays only the [FinalTilesGallery id=’1′] shortcode without loading anything. While I open this page standalone it works. Is there is any way I can display the gallery with the rest of the pages on one page?
- The topic ‘gallery wont work while echo all $content on 1 page’ is closed to new replies.