WordPress.org

Ready to get started?Download WordPress

Forums

video and post together as custom post type? (3 posts)

  1. lee718
    Member
    Posted 1 year ago #

    I am trying to display a video (vimeo) and would like a description which will be lengthy to be on the right side of the video. I have tried doing this as a custom post type and the video displays and plays fine but the problem is text is underneath and I can't target it with css to get it to float to the side. I am pretty sure this is because both video and text are "content" in the post and I can't target them separately.

    Does anyone know of a way of inserting a video and post together as custom post type? Or if I have to use a plugin what is a good one for showing descriptions to the right of the video. I have tried a bunch and they haven't done it.

    Thanks

  2. rocketman7k
    Member
    Posted 1 year ago #

    Yes, but there are a lot of things to consider.
    You can accomplish this through custom fields.
    Insert the video through a custom field, keep the description as the content.

    Since you are using a CPT, you will want to create a single-(post-type-name).php and or and archive-(post-type-name).php. In those files you will then insert code to display the custom fields.
    You can wrap your code in CSS and control it from there.

    There is a simpler way, but it may not suit your needs, you could wrap the vimeo link and the description in DIV tags and style the tags.

  3. lee718
    Member
    Posted 1 year ago #

    I had tried the custom fields before and it didn't working using "video" for key and the vimeo id only for the value. That seems logical. BUT I had forgotten to create the archive and single pages so maybe that is the issue.

    Thanks, I'll let you know how it goes.

Topic Closed

This topic has been closed to new replies.

About this Topic