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 »

Frontpage only help!


  #1  
Old Feb 24, 2009, 03:11 PM
PKM@1LineMedai
 
3 posts · Feb 2009
I've been trying to look through the forum and use past suggestions but I am hitting a wall!

Our Front page is set to show our latest post in the reading prefs.

What I am trying to do is have something only show up on the first front page, but it is still showing up on everypage

I've tried (likely incorrectly) variations of the following without success
PHP Code:
<?php if ( is_front_page() ) ?>
<?php 
if ( is_home() AND !is_paged() ) ?>
<?php 
if ( is_home() ) ?>
If I need to create a static page for this to work, can I create a page that behaves the same as 'your latest post?'

any help would be fantastic!!

Thanks!
Peter
http://www.1linemedia.com
  #2  
Old Feb 24, 2009, 03:30 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
It looks like you have not set the home page to be a static page (Your Settings -> Reading -> Front page displays: is set to "Your latest posts")

In that case

PHP Code:
<?php if ( is_home() AND !is_paged() ) ?>


should work. Where did you put that code? It should go into index.php, right after
PHP Code:
<?php get_header(); ?>
You also need to close this conditional statement, so you end up with

PHP Code:
<?php get_header(); ?>
<?php 
if ( is_home() AND !is_paged() ) { ?>
Stuff to display only on front page
<?php ?>

Last edited by Flynn; Feb 24, 2009 at 04:04 PM. Reason: Added one missing {
  #3  
Old Feb 24, 2009, 03:32 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You might also want to add a bit of space around the content inside of widgets, now that you've put a border around the widget. You can do that by adding the following to A. Theme Options -> Widgets -> Widget Content Box:

HTML Code:
padding: 5px;
  #4  
Old Feb 24, 2009, 03:51 PM
PKM@1LineMedai
 
3 posts · Feb 2009
Hey Flynn!

Unfortunately I am getting this error:

Code:
Parse error: parse error, unexpected '}' in /raid4/webraid/home/s/sis/1linemedia/wp-content/themes/atahualpa/index.php on line 16
I'm sure this is something simple, but I only know enough PHP to get myself in trouble, any suggestions?

Peter
  #5  
Old Feb 24, 2009, 03:59 PM
PKM@1LineMedai
 
3 posts · Feb 2009
I just got it
PHP Code:
<?php get_header(); ?>
<?php 
if ( is_home() AND !is_paged() ) { ?>
Stuff to display only on front page
<?php ?>
not sure if this is functionally correct, but it works!

Thanks!!!
Peter
  #6  
Old Feb 24, 2009, 04:04 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Sorry, I left out one { in the code above. Fixed now.
Yes, your code in post #5 is correct.
  #7  
Old Apr 1, 2009, 02:04 PM
blueprairie
 
98 posts · Feb 2009
I would like to do something similar. I want to include (event calendar 3 plugin):

<?php ec3_get_events(999); ?>

on index.php but only have it display on my calendar page.

The page title is: Calendar
The page number is: /?page_id=146

Thanks for the help!
  #8  
Old Apr 1, 2009, 02:12 PM
blueprairie
 
98 posts · Feb 2009
Also...I'd really like to use this call to only display the calendar items in a certain category...if you happen to know the answer, I'd appreciate the knowledge!

Thanks again!
  #9  
Old Apr 2, 2009, 04:22 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Only on page with ID 146

PHP Code:
<?php if ( is_page('146') ) { ec3_get_events(999); }  ?>
Only on page with title Calendar

PHP Code:
 <?php if ( is_page('Calendar') ) { ec3_get_events(999); }  ?>
Only in category with ID XX

PHP Code:
 <?php if ( is_category('XX') ) { ec3_get_events(999); }  ?>
Only on single post pages of posts that are filed under category XX

PHP Code:
 <?php if ( is_single() AND in_category('XX') ) { ec3_get_events(999); }  ?>

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Alphabetical Menu in Frontpage rudianaeva Atahualpa 3 Wordpress theme 1 Mar 30, 2009 08:10 AM
NO Sidebars on Frontpage manfredk Sidebars & Widgets 1 Feb 19, 2009 06:07 AM


All times are GMT -6. The time now is 02:34 AM.


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