WordPress.org

Forums

Spun
Post the title below images (7 posts)

  1. Cafn
    Member
    Posted 1 year ago #

    Hi there guys.

    I'm trying to do something on my blog.

    Basicly, On main pages and category pages, I want to show the title of posts below the images.

    Here's an example to show basicly what I want:

    http://i.gyazo.com/af15d00e634255b124ddff4ac7e5ed77.png

    Thanks for the help.

  2. Andrew
    Nuh uh moderator
    Posted 1 year ago #

    Install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin

    Then use its "CSS Code" section of the dashboard to hold your CSS modifications.

    It'll be something like this to get the titles to show:

    .hentry .thumbnail-title {
     display: block;
     bottom: -137%;
     overflow: visible;
    }

    Then something like this to get the space between the circles:

    .hentry {
     margin-bottom: 100px;
    }

    Of course you'll have to change what ever you set there on Tablet and Mobile, as this theme is responsive.

  3. Cafn
    Member
    Posted 1 year ago #

    Hi there andrew. Thanks a lot for your time.

    It worked smooth, though had to change the content-home line for this:

    $thumb = get_the_post_thumbnail( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( get_the_title() ) ) ) . '<span class="no-thumbnail">' . get_the_title() . '</span>';

    Anyway, is there a way to make it show only on custom categories? For example, I have 4 category pages, and only want the to show titles below images on 1 category page, while others only shows images without titles.

  4. Andrew
    Nuh uh moderator
    Posted 1 year ago #

    You can apply CSS to specific pages if that's what you mean. Have you seen the classes in your <body> element when you view the page source?

  5. Cafn
    Member
    Posted 1 year ago #

    Ohh so basicly I can hide and show the title, based on the class of <body> element, thats it?

  6. Andrew
    Nuh uh moderator
    Posted 1 year ago #

    Yes you target the class that is unique to the page you want to style.

  7. Cafn
    Member
    Posted 1 year ago #

    Hi there.

    Sorry for the delay on answer. So far, working nice.

    About the distance between the picture and the title, is it possible to change?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic