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
Frontpage only help!

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.

Bookmarks



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:40 PM.


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