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 » Center area post/pages »

[SOLVED] how to create a page template?


  #1  
Old Dec 31, 2009, 05:28 AM
drongo
 
27 posts · Sep 2009
[SOLVED] how to create a page template?

Hi,

I am new to Wordpress and I am using Atahualpa. I try to use WP more like a CMS. So I have a lot of pages. In the documentary of WP it is written that I can use templates for pages to insert posts of a specific category in my pages. The page.php should be the default template. And I just need to create a new something.php for each page which should have a unique template. But there is no page.php in the atahulapa-folder. When I copy one from the default-WP-theme and name it like template1.php, it doesn't show up in the template-dropdown-list. How does Atahualpa handle templates? Does it at all? Or is there any other way to bring complete articles to a page?

Greetings,
Drongo

Last edited by drongo; Jan 1, 2010 at 11:20 AM. Reason: theme of thread altered
  #2  
Old Dec 31, 2009, 05:33 PM
Rashell's Avatar
Rashell
 
67 posts · May 2009
With ATA all the "templates" are created from the same .php files. It won't matter whether you're creating a post, a page, an archive, etc. If you want to create a bunch of pages you just need to go to the Page section of your admin and click "add new" to get another blank content screen for a new page.

With ATA, you only need to create a page templates if you want to have a different page formats or styles from the one you are primarily using. Say for instance if you want to create a blue colored background for all your posts on peas and a green colored background for posts on blueberries... You'd make a "blue" template and a "green" template. And those would appear in the dropdown.

If you don't need pages that look "different" you're all set with ATA. You just need to add a new post or a new page. It's automatic!

Rashell
  #3  
Old Dec 31, 2009, 05:58 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
Do you have an example of what you are trying to accomplish drongo? There is probably an easier way to go than creating page templates.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #4  
Old Jan 1, 2010, 07:11 AM
drongo
 
27 posts · Sep 2009
Hi,

I know how to create different pages. But I dont know how to add articles of the blog to them. I am trying the plugin WP-RSSImport to add a feed of my categories to single pages, but it is not working very good.

For example, I have a page for press-articles about our culture-centre (its a german page):
http://www.kubiz-wallenberg.de/wordpress/?page_id=210
Here are only articles from this category:
http://www.kubiz-wallenberg.de/wordpress/?cat=12

And on the main page only special articles should show up:
http://www.kubiz-wallenberg.de/wordpress/
from this category: http://www.kubiz-wallenberg.de/wordpress/?cat=1

The plug-in is not working good. Normaly it should add the articles with full html (images and stuff), not only the preview.
I thougt this can be accomplished more easily using templates.

Greetings,
Drongo
  #5  
Old Jan 1, 2010, 07:36 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
There are a couple of plugins you might want to try.
Front Page Manager and Opt-In Front Page
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #6  
Old Jan 1, 2010, 07:45 AM
drongo
 
27 posts · Sep 2009
nope, these are only for the front-page. But I want to have at the front page articles of category One, on another page articles of category Two and so on.
  #7  
Old Jan 1, 2010, 08:07 AM
Rashell's Avatar
Rashell
 
67 posts · May 2009
Ahhhh! I think I get it. You're trying to stylize your category pages with more information than what's coming up automatically.

If you need them images attached to your excerpts in thumbnail view. I've been able to add images using "Thumbnails for Excerpts". But that plugin had a conflict with another when I updated so I used "Get the Image".

If you really want to create a new page template you have to grab & combine code from 3 sources in ATA. The...

header.php
index.php
footer.php

You can combine the 3 give them a new template title (change the "LP" in the code below to whatever name you want to give it) and you'll see a new drop down box with that title included.

I created a new template that is exactly the same as the original except the header.php has a dynamic header rather than the original ATA header. Because nothing changed in the footer I left it as the original index.php was set up. From what I understood you'd have to combine the header.php & index.php to form a new template since both have important elements of the code, which makes the page display. I may be wrong...

As I mentioned the code below changes the header of the page giving it a Dynamic Header so if you download that plugin you're good to go. Otherwise you want to change the code between

PHP Code:
     <!-- Header -->
        <td id="header" colspan="<?php echo $bfa_ata['cols']; ?>">
                       <?php show_media_header(); ?>
        </td>
        <!-- / Header -->
Here's the code if it helps...

PHP Code:
<?php
/*
Template Name: LP
*/
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<?php /* if index.php or another page template (copied from index.php) was not used
(i.e. by a plugin such as WPG2), the global $bfa_ata would be empty */
global $bfa_ata; if ($bfa_ata == "") include_once (TEMPLATEPATH '/functions/bfa_get_options.php'); ?>
<?php 
if ( $bfa_ata['css_external'] == "External" ) { ?>
<link rel="stylesheet" href="<?php echo $bfa_ata['get_option_home']; ?>/?bfa_ata_file=css" type="text/css" media="all" />
<?php ?>
<?php 
include (TEMPLATEPATH '/functions/bfa_meta_tags.php'); ?>
<?php     
/* get all options: */ include (TEMPLATEPATH '/functions/bfa_get_options.php');?>
<?php 
if ($bfa_ata['favicon_file'] != "") { ?><link rel="shortcut icon" href="<?php echo $bfa_ata['template_directory']; ?>/images/favicon/<?php echo $bfa_ata['favicon_file']; ?>" /><?php ?>
<?php 
if ( is_single() OR is_page() ) { ?><link rel="canonical" href="<?php the_permalink(); ?>" /><?php ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php     wp_enqueue_script'jquery' ); ?>
<?php 
if ( function_exists('wp_list_comments') AND is_singular() ) {     wp_enqueue_script'comment-reply' ); } ?>
<?php wp_head
(); ?>
<?php 
echo ($bfa_ata['html_inserts_header'] != "" apply_filters(widget_text$bfa_ata['html_inserts_header']) : ''); ?>
<?php 
if ($bfa_ata['pngfix_selectors'] != "") { ?>
<!--[if IE 6]>
<script type="text/javascript" src="<?php echo $bfa_ata['template_directory']; ?>/js/DD_roundies.js"></script>
<script type="text/javascript">DD_roundies.addRule('<?php echo $bfa_ata['pngfix_selectors']; ?>');</script>
<![endif]-->

<?php ?>
</head>

<body <?php body_class(); ?><?php echo ($bfa_ata['html_inserts_body_tag'] != "" ' ' apply_filters(widget_text$bfa_ata['html_inserts_body_tag']) : ''); ?>>
<?php echo ($bfa_ata['html_inserts_body_top'] != "" apply_filters(widget_text$bfa_ata['html_inserts_body_top']) : ''); ?>

<div id="wrapper">
<div id="container">
<table id="layout" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<?php if ( $bfa_ata['left_col'] == "on" ) { ?><col class="colone" /><?php ?>
<?php 
if ( $bfa_ata['left_col2'] == "on" ) { ?><col class="colone-inner" /><?php ?>
<col class="coltwo" />
<?php if ( $bfa_ata['right_col2'] == "on" ) { ?><col class="colthree-inner" /><?php ?>
<?php 
if ( $bfa_ata['right_col'] == "on" ) { ?><col class="colthree" /><?php ?>
</colgroup> 


    <tr>

        <!-- Header -->
        <td id="header" colspan="<?php echo $bfa_ata['cols']; ?>">
                       <?php show_media_header(); ?>
        </td>
        <!-- / Header -->

    </tr>

    <!-- Main Body -->    
    <tr id="bodyrow">

        <?php if ( $bfa_ata['left_col'] == "on" ) { ?>
        <!-- Left Sidebar -->
        <td id="left">

            <?php // Widgetize the Left Sidebar 
            
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
        
                    <div class="widget widget_categories"><div class="widget-title">
                    <h3><?php _e('Categories','atahualpa'); ?></h3>
                    </div>
                    <ul><?php wp_list_categories('show_count=1&title_li='); ?></ul>
                    </div>
                    
                    <div class="widget widget_archive"><div class="widget-title">
                    <h3><?php _e('Archives','atahualpa'); ?></h3>
                    </div>
                    <ul><?php wp_get_archives('type=monthly'); ?></ul>
                    </div>
                                    
            <?php endif; ?>

        </td>

        <!-- / Left Sidebar -->
        <?php ?>

        <?php if ( $bfa_ata['left_col2'] == "on" ) { ?>
        <!-- Left INNER Sidebar -->
        <td id="left-inner">

            <?php // Widgetize the Left Inner Sidebar 
            
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Inner Sidebar') ) : ?>
        
                    <!-- no default content for the LEFT INNER sidebar -->
                                    
            <?php endif; ?>

        </td>
        <!-- / Left INNER Sidebar -->
            <?php ?>

        <!-- Main Column -->
        <td id="middle">

<?php
 
//Code automatically inserted by Featurific for Wordpress plugin
 
if(is_home())                             //If we're generating the home page (remove this line to make Featurific appear on all pages)...
  
if(function_exists('insert_featurific')) //If the Featurific plugin is activated...
   
insert_featurific();                    //Insert the HTML code to embed Featurific
?>

<?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 /* This outputs the next/previous post or page navigation. 
    This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
    
bfa_center_content($bfa_ata['content_above_loop']); ?>

    <?php /* The LOOP starts here. Do this for all posts: */
    
while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
    
        <?php /* Add Odd or Even post class so post containers can get alternating CSS style (optional) */
        
$odd_or_even = (($bfa_ata['postcount'] % 2) ? 'odd-post' 'even-post' ); ?> 

        <?php /* This is the actual Wordpress LOOP. 
        The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
        
bfa_center_content($bfa_ata['content_inside_loop']); ?>


                        
    <?php /* END of the LOOP */
    
endwhile; ?>

    <?php /* This outputs the next/previous post or page navigation and the comment template.
    This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
    
bfa_center_content($bfa_ata['content_below_loop']); ?>

<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>

<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>

<?php endif; /* END of: If there are no posts */ ?>

<?php bfa_center_content($bfa_ata['center_content_bottom']); ?>

<?php get_footer(); ?>

Last edited by Rashell; Jan 1, 2010 at 08:15 AM.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hi all - Need help with page template witchybrit Atahualpa 3 Wordpress theme 2 Dec 3, 2009 12:05 PM
How do I create a new page template? JakeThePeg Page & Category Menu Bars 10 Sep 7, 2009 10:33 AM
Template Page with only widget abovocipher Atahualpa 3 Wordpress theme 2 Aug 23, 2009 09:12 PM
Using Page Template - where to select? Charlotte Excerpts, Read more, Pagination 1 Feb 28, 2009 01:49 PM
New Template Page Axon Atahualpa 3 Wordpress theme 1 Feb 8, 2009 01:34 PM


All times are GMT -6. The time now is 06:13 AM.


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