php kode til side navigations widget

<?php
$parentID = get_ancestors(get_the_ID(), ‘page’);
$args = array(
‘sort_column’ => ‘menu_order’,
‘sort_order’ => ‘asc’,
‘child_of’ => $parentID[0]
);
$pagelist = get_pages($args);
$pages = array();
foreach ($pagelist as $page) {
$pages[] += $page->ID;
}
$current = array_search(get_the_ID(), $pages);
$pCount = count($pages);
?>
<div class=”btNavButtons”>
<?php previous_page_link_plus( array(
‘in_same_parent’ => true,
‘format’ => ‘%link’,
‘link’ => ‘<img src=”https://betterthesis.dk/wp-content/uploads/2012/12/prevbut.png” />’,
‘order_by’ => ‘menu_order’
) ); ?>
Page <?php echo $current+1; ?> of <?php echo $pCount ?>
<?php next_page_link_plus( array(
‘in_same_parent’ => true,
‘format’ => ‘%link’,
‘link’ => ‘<img src=”https://betterthesis.dk/wp-content/uploads/2012/12/nextbut.png” />’,
‘order_by’ => ‘menu_order’
) ); ?>
</div>

Test video til forside – post

 

 

 

 

 

 

 

sd<.sdmf.<msfm

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!