• Resolved Franklind

    (@per-ake-framklind)


    Hi,

    I saw some post about using excerpt but i had problem to get rid of “continue reading” so I did a test to use the editor instead.

    I have a test with a couple of movie slides running on me WP sait.

    A div table in HTML using editor

    <div class="caption-left">Recently Viewed: 2013-07-26</div>
    <div class="caption-center">Gran Torino (2008)</div>
    <div class="caption-right"><a href="http://www.imdb.com/title/tt1205489/" target="_blank"></a></div>

    and CSS

    .caption {
        background: rgba(0,0,0,0.2);
        display:table;
        position: absolute;
        bottom: 0;
        width: 98%;
        height: 43px;
        padding: 4px 0 0 2%;
    }
    .caption-left {
        display: table-cell;
        vertical-align: middle;
        font-style: italic;
        color: #FFFFFF;
        width: 32%;
    }
    .caption-center {
        display: table-cell;
        vertical-align:middle;
        text-align: center;
        font-size: 1.286em;
        color: #FFFFFF;
        width: 32%;
    }
    .caption-right a {
        background: url(images/IMDb.png) no-repeat;
        position: absolute;
        right: 2%;
        width: 53px;
        height: 43px;
    }

    Code in meteor-slideshow.php
    <div class="caption"><?php the_content();?></div>

    and functions.php
    add_post_type_support('slide', 'editor');

    Can i do this in better way.
    1) Use the title field?
    2) Use the link field? (i only want to have the IMDb link on IMDb logo not the image
    3) Date from publish?

    I’m still a beginner in WP so any help is needed 🙂

    http://ww.wp.xz.cn/plugins/meteor-slides/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Franklind

    (@per-ake-framklind)

    Is it possible to use inf. from image fields like Caption and description?

    Plugin Author Josh Leuze

    (@jleuze)

    You can certainly use the post editor if that’s what you need. I’ve run into that issue before with a theme adding read more links or otherwise messing with excerpts, I usually fix the theme to check the post type and only do it for blog posts.

    It is possible to use the image metadata, but it is hard to manage this content, because you have to go into the media library and edit the image content, you can’t edit it right from the slide post.

    I like to use the slide title and add other content to the slide posts as needed so it is easy to manage. For what you are doing I’d use the Advanced Custom Fields plugin and create a new custom metabox for the slide posts with a fields for the date and IMDB link. Here’s a great tutorial on how to do that.

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

The topic ‘Text on slides using div table’ is closed to new replies.