Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   How to register a custom page template to Atahualpa sidebar manager (http://forum.bytesforall.com/showthread.php?t=15058)

Michael T. Aug 10, 2011 03:58 PM

How to register a custom page template to Atahualpa sidebar manager
 
I use Atahualpa in my webpage. Atahualpa is a great tool to customize the layout easily.

To show a kind of index for glossary items row by row, I use a custom page template (archiv_a-z.php):

PHP Code:

<?php
$posts 
query_posts('tag=glossary''&orderby=title&order=asc&posts_per_page=-1');
foreach(
$posts as $post) : ?>
<li class="<?=($i%2)?"color1":"color2";$i++;?>"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul></div>
<div id="menue">
<br><br><br><br>
<?php do_action('wp_menubar','AZ_Menue'); ?>
<br><br>
</div>
 <?php get_footer(); ?>

By this definition the template is "unknown" to Atahualpa, i.e., no sidebars are shown, neither left nor right - outer nor inner.

Can I register the custom template archiv_a-z.php to Atahualpa, so that I could specify which sidebar should be displayed?

Thanx & cheers

juggledad Aug 10, 2011 04:09 PM

You need to take a look at index.php for the header and footer info.

Michael T. Aug 10, 2011 04:13 PM

Hi Ho,

I found a solution at Wordpress.org:

http://wordpress.org/support/topic/a...-page-template

Michael

juggledad Aug 10, 2011 04:16 PM

things have changes from 2 years ago.

Michael T. Aug 10, 2011 04:45 PM

Hi Juggledad,

your are right... times are changing...

Thus I tried the short snippet from index.php only:

PHP Code:

<?php 
list($bfa_ata$cols$left_col$left_col2$right_col$right_col2$bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header(); 
extract($bfa_ata); 
?>

...here comes my code ...

WoW that's pretty clean and short code!

Thanx juggledad

Michael

juggledad Aug 10, 2011 05:18 PM

You need to add the footer code from Index.php to get the right sidebars and the footer

Michael T. Aug 11, 2011 01:44 AM

juggledad, thanx for the advice. But index.php shows only one call: <?php get_footer(); ?> - and this is the last line of my code (see my first posting).
Is there anything else to consider for the footer?

Cheers Michael

juggledad Aug 11, 2011 07:24 AM

That's it that will handle the right sidebars and footer


All times are GMT -6. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.