Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1138

    What I’m trying to do is make specific posts show the small sized css style through a custom field. Right now I’m defaulting to show all full sized posts. Site: 8bitdad.com

    Is there an override per post that will allow me to call that div id or style for small sized posts?

    Thanks in advance

    #34159

    You can modify the body via custom meta style – open header.php and replace:

    <body id='top' <?php body_class($k_body_class);?> >

    with

    <body id='top' <?php body_class($k_body_class); if ( get_post_meta($post->ID, 'custom_css', true)) {echo ' style="'.get_post_meta($post->ID, 'custom_css', true).'" ';} ?> >

    or you can also “hardcode” your style info like:

    <body id='top' <?php body_class($k_body_class); if ( get_post_meta($post->ID, 'custom_css', true)) {echo ' style="text-size:15px;color:#000;" ';} ?> >

    The Dude

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘specify small sized post per custom field’ is closed to new replies.