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 »

Change background color first post


  #1  
Old Nov 6, 2010, 10:27 AM
zeolan
 
2 posts · Nov 2010
I wanna change the colour only for my first post.
I think i do on the loop, but i dont know how.

Thank u for the answers.
  #2  
Old Nov 6, 2010, 03:37 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
look at the documentation at ato->Style & edit CENTER COLUMN-The LOOP and you will see how to set up a test for the post count. Us ing his, you could add a <div ID="first_post"> and a </div> around the post parts and then add CSS to style the background.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 7, 2010, 07:56 AM
zeolan
 
2 posts · Nov 2010
Sorry, but i don't understand where i can put <div..
i try do some like this.. but dosen't work

Quote:
......<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>

<div <?php if ( is_front_page() AND $bfa_ata['postcount'] == 1 ) { ?> class="first_post">
<?php } ?></div>


<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>" >
<?php } else { ?>........
  #4  
Old Nov 22, 2010, 03:28 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
When you want to get into specific changes like this, you need to know some PHP and HTML and how they interact. You should wrap the entire contents of "the LOOP' in the DIV, so you have to test for the first post, put in the div at the top, then at the bottom, test again for the first post and add the closing DIV html.

And don't double post
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to change the entire background color, not the body color? crobertl Forum How-To 24 Sep 12, 2010 10:00 AM
[SOLVED] cannot get the background color to change sarge Atahualpa 3 Wordpress theme 9 Oct 26, 2009 08:00 PM
[SOLVED] How to change Post Content (Body) background color darmanpurba@gmail.com Forum How-To 6 Aug 10, 2009 05:34 AM
Why won't my background color change? timecatcher Atahualpa 3 Wordpress theme 3 Jul 28, 2009 05:25 AM
How do you change the background color? theyankeeblog Header configuration & styling 2 May 13, 2009 12:09 PM


All times are GMT -6. The time now is 05:27 AM.


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