WordPress.org

Forums

[closed] Change Link Color (5 posts)

  1. aled2305
    Member
    Posted 1 year ago #

    Hello, I'm building a WP theme and am making a home page. If you visit http://beta.techyoucation.com/ you will see box in the top left with a purple top. The content in that is the latest post, which I got using

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
          <?php
        // Fetch most recent posts, limit to 1
    		$latest_posts = get_posts( array(
    			'posts_per_page' => 1,
    		) );
        // get first and only item in array
    		$latest_post  = $latest_posts[0];
    	?>
    
    	<h3><a href="<?php echo get_permalink( $latest_post->ID ); ?>"><?php echo $latest_post->post_title; ?></a></h3>
    	<?php if ( has_excerpt( $latest_post ) ) : ?>
    	<p><?php echo $latest_post->post_excerpt; ?></p>
    	<?php else : ?>
    	<?php echo strip_shortcodes(wp_trim_words( $latest_post->post_content, 50 )); // '250' is number of words ?>
    
    	<?php endif; ?>

    Now the title "Coming Soon" is green like every other link on the site, but I would like this one to be purple like the box?

    How would I do this

    Thanks in advance

    Aled

  2. leejosepho
    Member
    Posted 1 year ago #

    If that is Twenty Thirteen, you might get a quicker response here:
    http://wordpress.org/support/theme/twentythirteen

  3. aled2305
    Member
    Posted 1 year ago #

    No it's Simon WP Framework!!!

    Aled

  4. WPyogi
    Forum Moderator
    Posted 1 year ago #

  5. aled2305
    Member
    Posted 1 year ago #

    Okay thanks WPyogi

Topic Closed

This topic has been closed to new replies.

About this Topic