2014-03-15, 05:34:15
Here's a modified version of the script, that works (for me) with I18N Gallery when using the (% gallery ... %) placeholder.
- If you don't have a functions.php file in your theme, create one with this content:
- Insert this in the functions.php file:
(if you had customized the foreach, etc., you know what you have to change there.)
- If you were using the previously posted script in the template, remove it and put <?php get_page_content(); ?> instead.
If not, you don't need to touch your template. But you have to:
- Go to Admin > Settings and set your Custom Permalink Structure to:
(I've done just a quick test with this... backup before trying...)
- If you don't have a functions.php file in your theme, create one with this content:
Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
- Insert this in the functions.php file:
Code:
$content = '';
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
foreach ($pagesSorted as $page) if ($page['url']!='index' && $page['menuStatus']=='Y') {
$pag = $page['url'];
$content .= '
<a name="'.$pag.'"></a>
<div class="pagecontent '.$pag.'">
<h2>'.returnPageField($pag,'title').'</h2>
'.returnPageContent($pag).'
</div>
';
}
- If you were using the previously posted script in the template, remove it and put <?php get_page_content(); ?> instead.
If not, you don't need to touch your template. But you have to:
- Go to Admin > Settings and set your Custom Permalink Structure to:
Code:
#%slug%
(I've done just a quick test with this... backup before trying...)