Styles for Blog Page

Support Area Forums Forward Styles for Blog Page

This topic contains 7 replies, has 2 voices, and was last updated by  Bill Robbins 1 year ago.

Viewing 8 posts - 1 through 8 (of 8 total)
URL to the page in question: http://newsite2016.thinknewmexico.org/WordPress/news/
  • Author
    Posts
  • #37580

    Kristina Fisher
    Participant

    Hi Bill,

    One more: is there a way to create a couple special styles for the blog page?

    I’d like to eliminate the “featured images” above the posts (I included them so that there would be images on the excerpts on the home page), and I’d like to make the links in the headers of the blog page yellow instead of red.

    thank you!
    Kristina

    #37590

    Bill Robbins
    Keymaster

    You’re welcome to customize any way you’d like to. WordPress adds several classes to the HTML body tag on every page that can be used to style that page or similar pages separately from the rest of the site. This CSS would style just the blog page by hiding the featured images and changing the title link color:

    
    .blog .post .featured-image {
    	display: none;
    }
    
    .blog .page-title a,
    .blog .page-title a:visited {
    	color: #fee532;
    }
    

    There are lots of possibilities on how you can build on this idea.

    Have a great weekend,
    Bill

    #37606

    Kristina Fisher
    Participant

    Thanks, Bill! That worked perfectly. 🙂

    One question about the blog post excerpts that show up on the Featured Posts widget — is there a way to make links work from those excerpts? They work fine on the blog posts themselves, but do not show up as links in the excerpts.

    thank you,
    Kristina

    #37622

    Bill Robbins
    Keymaster

    Good Morning Kristina,

    That is an excellent question. By default WordPress filters out everything but text inside the excerpt. There is a plugin called Advanced Excerpt (https://wordpress.org/plugins/advanced-excerpt/) that lets you specify what HTML is kept and which is dropped in the excerpt. I believe you can set that up so that links are kept. That’s what I would try first. Hope that helps out.

    Have a great week,
    Bill

    #37678

    Kristina Fisher
    Participant

    Hi Bill,

    I’ve played around with the Advanced Excerpt plugin but unfortunately haven’t been able to get the excerpts to include links. http://newsite2016.thinknewmexico.org/WordPress/

    The only place where the excerpts appear is in the widget “featuredposts-2” on the homepage so I’m wondering if there is any custom code I can add to that widget specifically so that it will either display the full post (they’ll all be ~1 paragraph) rather than an excerpt, or to tell it to keep html mark-up in the excerpts?

    thanks!
    Kristina

    #37679

    Bill Robbins
    Keymaster

    The widget has three content options: excerpt, content limit (like excerpt but you specify how much text) and full content. If you’ll pick the full content one, I believe that will get you what you’re looking for.

    #37680

    Kristina Fisher
    Participant

    Perfect, thank you!

    #37681

    Bill Robbins
    Keymaster

    Anytime 🙂

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

The topic ‘Styles for Blog Page’ is closed to new replies.