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 » Post-Kicker, -Byline & -Footer »

Format a "particular" Post differently


  #1  
Old Mar 22, 2009, 08:34 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Okay. I now have just the most recent post of a specific category appearing at the top of the center section of my static homepage.

http://www.shepherdjim.com
Please be kind -- the Shepherd Jim w/site is my sandbox where I'm testing stuff.

Now, how do I format the elements of THAT post's <div class="post-bodycopy clearfix">, div class="post-headline">, etc. without changing the appearance of all the other posts on single, multiple, search, etc post pages? I know I should be simply targeting in CSS but I'm not clever enough.
  #2  
Old Mar 23, 2009, 02:41 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You can change in index.php, towards the bottom:

PHP Code:
<body<?php echo
to

PHP Code:
<body<?php 
if ( is_page() ) { 
    
$current_page_id $wp_query->get_queried_object_id(); 
    echo 
' class="page page-' $current_page_id '"'
?><?php echo
Then add a CSS Insert:

HTML Code:
body.page-XX div.post-bodycopy {
.....
}
body.page-XX div.post-headline {
.....
}
Replace XX with the ID of the page containing the posts to be styled

With the above example you could also group-style all pages due to 2 classes (page and page-XX) being added, i.e. with a CSS Insert

HTML Code:
 body.page div.post-headline {
...
}
I am adding CSS classes to "body" in the next Atahualpa version.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to post on 2 seperate "Pages" or "Cats" TPR Atahualpa 3 Wordpress theme 18 Aug 4, 2010 08:24 PM
Adding a "Post" link to post an article jenyum Post-Kicker, -Byline & -Footer 1 Jun 21, 2010 05:17 AM
Archives Page-How can I add the date before the post title when using "postbypost"? fromtheranks Atahualpa 3 Wordpress theme 8 Jul 25, 2009 09:52 AM
How to style "post icon" and "post comments" text Whatsthatcat? RSS, Feeds & Subscribing 3 Apr 1, 2009 09:41 AM
How to use <?php... ?> code in "Post Info Items" sections? TotalBalance Post-Kicker, -Byline & -Footer 0 Mar 14, 2009 03:01 PM


All times are GMT -6. The time now is 06:09 PM.


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