Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Display page title in custom page template (http://forum.bytesforall.com/showthread.php?t=18696)

beetle8 Oct 18, 2012 08:50 AM

Display page title in custom page template
 
I created several custom page templates,
Not sure where I copied the base code from (possibly juggledads custom template)
everything works fine but the page titles don't automatically show up, which is good in some cases but not in most.

What I want is for the typical Atahualpa functionality to exist, where the title displays by default unless the 'do not display' box is checked.

Here is the code I'm using for the template.

HTML Code:

<?php
/*
Template Name: 10 Miler
 
*/
 ?>

 
<?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);
global $bfa_ata_postcount;
?>


<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata_postcount = 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>


        <?php // Deactivated since 3.6.5
        # include 'bfa://content_above_loop';
        // Uses the following static code instead: ?>

        <?php bfa_next_previous_page_links('Top'); // For MULTI post pages if activated at ATO -> Next/Previous Navigation:  ?>

        <?php while (have_posts()) : the_post(); $bfa_ata_postcount++; ?>
       
                <?php // Deactivated since 3.6.5
                #include 'bfa://content_inside_loop';
                // Uses the following static code instead: ?>

                <?php bfa_next_previous_post_links('Top'); // For SINGLE post pages if activated at ATO -> Next/Previous Navigation  ?>
                <?php /* Post Container starts here */
                if ( function_exists('post_class') ) { ?>

                <div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
                <?php } else { ?>
                <div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
                <?php } ?>
                <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">
<table align="right">
<tbody>
<tr>
<td>
<div style="position: relative; z-index: 999;">
...more below...


juggledad Oct 18, 2012 01:27 PM

You don't have the code to display the titles in you custom template.

beetle8 Oct 19, 2012 05:03 AM

Understood,

I was hoping someone would help me with that.

juggledad Oct 19, 2012 05:33 AM

take a look at the index.php and you will see the code needed.

May I ask why you are using templates?

beetle8 Oct 19, 2012 07:18 AM

I have submenus in the center columns of specific page groups.

I looked at index.php, sadly I don't have the experience yet to read and understand it thourughly enough to know what to grab, I'll just go back and eff around till I figure it out on my own,

juggledad Oct 19, 2012 08:43 AM

you need to change
HTML Code:

                <?php bfa_post_bodycopy('<div class="post-bodycopy
to
HTML Code:

                <?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
                <?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
                <?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
                <?php bfa_post_bodycopy('<div class="post-bodycopy

but can I suggest you dump all thetemplates, modify the index.php to add a new widget area. Then you could add the 'custom menu widget' to the widget area and have your custom menus. If you needed multiple menu's you could add multiple copies of the 'custom' menu' widget and then use the plugin 'widget logic' to control which menu shows on which page.

This would mean on a theme upgrade, you would only have to worry about adding the new widget area back into index.php. You would just change the line
HTML Code:

                <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
to
HTML Code:

                <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
                <?php bfa_widget_area('name=My submenu widget area'); ?>


beetle8 Oct 22, 2012 07:00 AM

is the theme updating benefit the only reason for ditching the custom templates?

juggledad Oct 22, 2012 07:28 AM

Isn't that enough. If the index.php changes, you have to go back and change multiple files vers just changing the index.php. But it is your choice.


All times are GMT -6. The time now is 12:35 PM.

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