WordPress.org

Ready to get started?Download WordPress

Forums

Contextual Related Posts
[resolved] CSS style not working on Home page (4 posts)

  1. Ed
    Member
    Posted 1 year ago #

    I am using Custom CSS to add to header. It works fantastic on all my posts. When I check the box "Add related posts to:" and check the "Home Page" I get a non Custom list. I get the default style. Thank you for your help.

    http://wordpress.org/extend/plugins/contextual-related-posts/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Can you post your CSS code here?
    On the Home and other Other archive pages, the plugin uses a class instead of an ID, so you'll need to style .crp_related

  3. b...b
    Member
    Posted 1 year ago #

    same problem:

    The CSS styling only works on the post.

    When home page is selected, it uses default styling on the home and custon css on the posts.

    my site is here:

    http://www.currentinspiration.com/my-blog-daily-dose-of-inspriation/

    I am using this code from your sticky:

    #crp_related ul {
    list-style: none;
    float: left;
    margin: 0;
    }
    #crp_related li, #crp_related a {
    float: left;
    overflow: hidden;
    position: relative;
    text-align: center;
    }
    #crp_related li {
    margin: .9em;
    border: 1px solid #ddd;
    padding: 6px;
    }
    #crp_related li:hover {
    background: #eee;
    border-color: #bbb;
    }
    #crp_related a {
    width: 150px;
    height: 150px;
    }
    #crp_related a:hover {
    text-decoration: none;
    }
    #crp_related img {
    max-width: 150px;
    margin: auto;
    }
    #crp_related .crp_title {
    position: absolute;
    height: inherit;
    bottom: 6px;
    left: 6px;
    padding: 3px;
    width: 144px; /* = 150px - (3px * 2) */
    color: #fff;
    font-size: .9em;
    text-shadow: #000 .1em .1em .2em;
    background: rgb(0.5, 0.5, 0.5);
    background: rgba(0, 0, 0, 0.5);
    }
    #crp_related li:hover .crp_title {
    background: rgb(0.2, 0.2, 0.2);
    background: rgba(0, 0, 0, 0.8);
    }

  4. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    For the homepage you need to use .crp_related instead of #crp_related

    You need to use a double declaration like this:

    #crp_related ul, .crp_related ul {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.