Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Display page title in custom page template


  #1  
Old Oct 18, 2012, 08:50 AM
beetle8
 
20 posts · Jul 2010
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...
  #2  
Old Oct 18, 2012, 01:27 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You don't have the code to display the titles in you custom template.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Oct 18, 2012 at 02:06 PM.
  #3  
Old Oct 19, 2012, 05:03 AM
beetle8
 
20 posts · Jul 2010
Understood,

I was hoping someone would help me with that.
  #4  
Old Oct 19, 2012, 05:33 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
take a look at the index.php and you will see the code needed.

May I ask why you are using templates?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 19, 2012, 07:18 AM
beetle8
 
20 posts · Jul 2010
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,
  #6  
Old Oct 19, 2012, 08:43 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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'); ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to select page width for a custom page template? raymasa Header configuration & styling 2 Mar 19, 2012 08:23 AM
Custom Page Template Alters Page Order In Menu Bar RichardG Page & Category Menu Bars 1 Sep 8, 2011 04:31 AM
How to have next/prev Page links in custom page template? bongo Center area post/pages 1 Oct 1, 2010 05:28 AM


All times are GMT -6. The time now is 05:06 PM.


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