• Resolved Ene Marius

    (@enemarius92)


    Hi,
    How can I make the video format posts to have the entry title below the excerp instead of above without affecting the other type of posts.

    Can anyone help?
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • How familiar are you with writing code?

    You can modify your template with a little bit of conditional work…
    http://codex.ww.wp.xz.cn/Post_Formats#Using_Formats
    Unless your site is already configured to use format specific templates, in which case you could add a video template…

    for instance 2011 and 2012 use format specific templates… so in a child theme it would be as simple as making a new template to handle video format…

    Thread Starter Ene Marius

    (@enemarius92)

    Thank you, I only know css and html. I understand php if I look at it but I don’t know how to use if that makes sense.
    Anyway, managed to to something

    I disabled entry-title showing on video format posts and then created a new entry-title as entry-title2.

    .format-video .entry-title {
    display:none;
    }
    
    article .entry-title2 {
    padding-left: 40px;
    margin-top: -15px;
    padding-bottom: 20px;
    padding-right: 40px;
    font-size: 21px;
    font-weight: normal;
    font-family: 'Ubuntu', sans-serif;
    border-top: 0px solid white;
    }

    Then I put this code after the excerp

    <?php if ( has_post_format( 'video' )) : ?>
    		<h1 class="entry-title2"> <a>" rel="bookmark"><?php the_title() ?></a></h1>
    		<?php endif ?>

    It works well.

    Thank you for your help and Happy Holidays 🙂

    [MOD NOTE: please post code using the code button, or between backtics. As it is, the forum has eaten some of your delicious code and it is now incomplete]

    If it works for your needs, then good job!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘If post format is video’ is closed to new replies.