• Hello,

    I’m trying to add static text above my blog posts. Here’s my index.php file. On line 7 is where I have the text by an echo. It works, but I want to color ONLY that line of text to be white with a black background. Everything I tried failed. Any hints for an inline color that doesn’t affect the rest of the post page’s css?

    <?php get_header(); ?>
    <div class=”art-layout-wrapper”>
    <div class=”art-content-layout”>
    <div class=”art-content-layout-row”>
    <div class=”art-layout-cell art-content”>
    <?php get_sidebar(‘top’); ?>
    <?php echo “This is where I’ll post news, etc.”;
    <?php
    if(have_posts()) {

    /* Display navigation to next/previous pages when applicable */
    if ( theme_get_option(‘theme_’ . (theme_is_home() ? ‘home_’ : ”) . ‘top_posts_navigation’ ) ) {
    theme_page_navigation();
    }

    /* Start the Loop */
    while (have_posts()) {
    the_post();
    get_template_part(‘content’, get_post_format());
    }

    /* Display navigation to next/previous pages when applicable */
    if (theme_get_option(‘theme_bottom_posts_navigation’)) {
    theme_page_navigation();
    }

    } else {

    theme_404_content();

    }
    ?>
    <?php get_sidebar(‘bottom’); ?>
    <div class=”cleared”></div>
    </div>
    </div>
    </div>
    </div>
    <div class=”cleared”></div>
    <?php get_footer(); ?>

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • C W (VYSO)

    (@cyril-washbrook)

    I could be missing something obvious, but I’m confused as to why you need to use an echo for that line at all. Just put in something like <p class="color">The quick brown fox jumps over the lazy dog</p> (without any <?php and ?> tags) and use a CSS rule to format the text as you wish.

    Thread Starter vicwind

    (@vicwind)

    Thanks, Cyril!
    I will give that a shot.
    I forgot that php happens in little islands and that the whole thing gets converted to html anyway.
    Cheers, and happy New Year!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Static Text above blogrollo’ is closed to new replies.