WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Archive Layout (2 posts)

  1. Jason Bridges
    Member
    Posted 10 months ago #

    Hello,

    I am using Custom Post Types for the first time (via the Custom Post Type UI plugin), and would like to create a grid-style archive page for this CPT (called "Properties").

    The "Properties" CPT archive page works fine, but I am having trouble styling it. I did eventually find an easy solution for a grid layout, but the css only applies to regular category archives (see here), not to custom post archives (see here). The css is as following:

    .archive .post, .blog .post {
    display:inline-block;
    vertical-align:top;
    width:45%;
    padding:1.25%;
    margin:1.25%;
    min-height:170px;
    background-color:#eee;
    }

    Does anybody perhaps know how I could get this css to apply to CPT archive pages too? Have been trying to target ".post-type-archive-properties" in css, but have been unable to solve my problem so far.

    Regards,

    Jason

  2. Jason Bridges
    Member
    Posted 10 months ago #

    Hello,

    Thought of something else to do, just created a div "grid-entry" around the post in the CPT archive template, added a css entry with the exact same details as for .post above, and it works.

    Regards,

    Jason

Reply

You must log in to post.

About this Topic