SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress - problem with pages and templates

    Hello
    i have setup a static page in the home and the post page as "news"
    so for the home page i have a new template for it that has an animation.

    However the News page, has another template (i just copy the home template and remove the animation from it, but it has a different name) but still calls the same animation and doesn't show the title of the post, just the post after the animation

    here's the site
    the HOME: http://guatemalasana.org/

    the NEWS; http://guatemalasana.org/news

    hope someone canl help me!
    - Inelastica.com | Cultura Grafica (spanish design blog)

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2009
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to go into wp-admin and edit the page that is news and remove what it is that you do not want.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, yes the template "news" doesn't have the animation that is in the home template. That's the weird thing....
    - Inelastica.com | Cultura Grafica (spanish design blog)

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    If I am understanding, you want the animation on the "home" page and not on the "news" page or any of the other pages?

    If so open home.php(if there is a home.php) if not, look for index.php in the themes folder open it in your code editor, and add the following around the animation:
    Code PHP:
    <?php if( is_home() ) { ?>
    <!--your animation goes here-->
    <?php } ?>
    Now you might have to alter the is_home() part to fit your needs.

  5. #5
    SitePoint Zealot
    Join Date
    Apr 2009
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BPartch View Post
    Hello

    If I am understanding, you want the animation on the "home" page and not on the "news" page or any of the other pages?

    If so open home.php(if there is a home.php) if not, look for index.php in the themes folder open it in your code editor, and add the following around the animation:
    Code PHP:
    <?php if( is_home() ) { ?>
    <!--your animation goes here-->
    <?php } ?>
    Now you might have to alter the is_home() part to fit your needs.
    If he is in fact using templates, the php files could have any name *.php

    It all depends on what comes after
    Code:
    /*
    Template Name:
    at the top of the php file.

  6. #6
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello
    thanks for your help, i have tried that but nothing, here's what i got, maybe im missing something:

    HOME TEMPLATE:

    <?php
    /*
    Template Name: My Home
    */
    ?>

    <?php get_header(); ?>

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

    <div id="content-left">
    <?php if( is_home() ) { ?>
    <?php include (ABSPATH . '/wp-content/themes/guatemala/slidehome.htm'); ?>
    <?php } ?>
    <p>&nbsp;</p>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div id="post-<?php the_ID(); ?>" <?php if(function_exists('post_class')) : post_class(); else : echo 'class="post"'; endif; ?>>


    <?php the_content(); ?>
    and here is
    NEWS TEMPLATE

    <?php
    /*
    Template Name: News
    */
    ?>
    <?php get_header(); ?>

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

    <div id="content-left">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div id="post-<?php the_ID(); ?>" <?php if(function_exists('post_class')) : post_class(); else : echo 'class="post"'; endif; ?>>

    <h3 class="post-title">
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    </h3>
    and i'm sure i have selected the home as front page and news as post page.
    and also in the page options each one has it's own template

    thank you very much for your time!
    - Inelastica.com | Cultura Grafica (spanish design blog)

  7. #7
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BTW
    now that i use this code:

    <?php if( is_home() ) { ?>
    the animation only appears in the NEWS page!! so wordpress is reading as home the News page.
    - Inelastica.com | Cultura Grafica (spanish design blog)


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •