Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Where's the page.php file? (http://forum.bytesforall.com/showthread.php?t=8012)

ISFNpub Jul 8, 2010 11:12 AM

Where's the page.php file?
 
I need to customize the static page template and there doesn't seem to be a static page php file in the Atahualpa folder?

juggledad Jul 8, 2010 01:21 PM

there isn't a page.php in atahualpa. What do you need to customize?

ISFNpub Jul 8, 2010 01:27 PM

Two things:

1. make static pages not contain a title.

2. know how to make page templates for the future (for example one that shows only posts from one category).

I've done this before with simpler themes, but atahualpa looks different. will this work in atahualpa? (it's the page of posts template from wordpress.org:

PHP Code:

<?php
/*
Template Name: Covers
*/

get_header(); ?>

<div id="content" class="narrowcolumn">

<?php
if (is_page() ) {
$category get_post_meta($posts[0]->ID'cover'true);
}
if (
$category) {
  
$cat get_cat_ID($category);
  
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  
$post_per_page 4// -1 shows all posts
  
$do_not_show_stickies 1// 0 to show stickies
  
$args=array(
    
'category__in' => array($cat),
    
'orderby' => 'date',
    
'order' => 'DESC',
    
'paged' => $paged,
    
'posts_per_page' => $post_per_page,
    
'caller_get_posts' => $do_not_show_stickies
  
);
  
$temp $wp_query;  // assign orginal query to temp variable for later use   
  
$wp_query null;
  
$wp_query = new WP_Query($args); 
  if( 
have_posts() ) : 
        while (
$wp_query->have_posts()) : $wp_query->the_post(); ?>
        <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <small><?php the_time('F jS, Y'?> <!-- by <?php the_author() ?> --></small>
        <div class="entry">
          <?php the_content('Read the rest of this entry ¬ª'); ?>
        </div>
        <p class="postmetadata"><?php the_tags('Tags: '', ''<br />'); ?> Posted in <?php the_category(', '?> | <?php edit_post_link('Edit'''' | '); ?>  <?php comments_popup_link('No Comments ¬ª''1 Comment ¬ª''% Comments ¬ª'); ?></p>
      </div>
    <?php endwhile; ?>
    <div class="navigation">
      <div class="alignleft"><?php next_posts_link('¬´ Older Entries'?></div>
      <div class="alignright"><?php previous_posts_link('Newer Entries ¬ª'?></div>
    </div>
  <?php else : ?>

        <h2 class="center">Not Found</h2>
        <p class="center">Sorry, but you are looking for something that isn't here.</p>
        <?php get_search_form(); ?>

    <?php endif; 
    
    
$wp_query $temp;  //reset back to original query
    
}  // if ($category)
?>

    </div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>



3. (unrelated but you might know) I don't want to use table on a page. Will uding <div cales="..."> and editing the style.css file work?

juggledad Jul 8, 2010 02:28 PM

to make a template, you want to copy the index.php and use it as a base. There is a
HOWTO: a 'Custom Query' PAGE template (http://forum.bytesforall.com/showthread.php?t=7822)
Quote:

This page template will allow you to use one template on any number of pages and craft a query to show posts on that page.

Want to show all the posts in a category - you can do it
Want to show all the posts for several categories - you can do it
Want to show all the posts for a tag? - you can do it
Want to show all the post except those from a category? - you can do that
Want to show all stickies? - yup, you can do that too

Here is what you do:

1) Install the attached template into the atahualpa folder
2) add a new page and use the template 'BFA Custom Query template'
3) add a custom field called 'bfa_custom_query'
4) craft your query
the gold forums are avaliable to members who have donated $20 or more.


in item (3) you say:
Quote:

Will uding <div cales="...">
What?? Note there is an area in the options called CSS Insert that allows you to add css inserts as a theme option. this way, when you update the theme, you don't have to go back and change the code.

Webmason Dec 12, 2010 10:45 PM

Quote:

Originally Posted by juggledad (Post 36418)
there isn't a page.php in atahualpa. What do you need to customize?

I am trying to use WP-eCommerce 3.8beta. It requires there be a "page.php" to work.

How can I integrate it?

Thanks and sorry if this is to vague a question. :confused:

Tom

juggledad Dec 13, 2010 04:00 AM

Where did you get the beta so I can see what is says to do

Webmason Dec 13, 2010 07:25 AM

Hi Juggledad,

Here is the link to the beta:
http://getshopped.org/news/wp-e-comm...8-public-beta/

I learned about needing the page.php from their support forum:
http://getshopped.org/forums/forum.php?id=19

Thanks for any insight!
Tom

juggledad Dec 13, 2010 08:13 AM

can you point to the exact forum thread? that link takes you to the forum page and I'm not looking thru them all...

Webmason Dec 13, 2010 08:39 AM

Oh sorry! Sure:
http://getshopped.org/forums/topic.php?id=16135

Webmason Dec 14, 2010 05:34 PM

What would be the single post page.php equivalent in Atahualpa?

juggledad Dec 14, 2010 06:26 PM

Index.php - you can copy it and call the copy single.php and add your mods there.

Webmason Dec 14, 2010 10:58 PM

Thanks again JD!

MikeBegley Sep 19, 2011 11:54 PM

I am running into a similar issue. Copying index.php to either single.php or page.php did not solve the problem. Does anyone know how to make atahualpa work nicely with wp-e-commerce 3.8?

thanks,
-mike

Webmason Sep 20, 2011 05:45 PM

Hi Mike,

I found the guys at wp-e-commerce to be very helpful. I don't know enough to know what's going wrong for you, but they even created a hook in the software for single.php just to solve my issue.

See if they can offer any help there too. They want their product to work well for most themes.

http://getshopped.org/forums/

Tom


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

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