Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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, 11: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, 04:37 PM
juggledad's Avatar
juggledad
 
23,682 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, 08: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, 04:28 AM
juggledad's Avatar
juggledad
 
23,682 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 11:00 AM
[SOLVED] cannot get the background color to change sarge Atahualpa 3 Wordpress theme 9 Oct 26, 2009 09:00 PM
[SOLVED] How to change Post Content (Body) background color darmanpurba@gmail.com Forum How-To 6 Aug 10, 2009 06:34 AM
Why won't my background color change? timecatcher Atahualpa 3 Wordpress theme 3 Jul 28, 2009 06:25 AM
How do you change the background color? theyankeeblog Header configuration & styling 2 May 13, 2009 01:09 PM


All times are GMT -6. The time now is 07:13 AM.


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