WordPress.org

Ready to get started?Download WordPress

Forums

Decode
[resolved] Custom Post Type - Videos (15 posts)

  1. KOKOStern
    Member
    Posted 7 months ago #

    Hey Scott,

    First I wanna say thank you for this incredible theme, really tremendous work!

    I'm embarking on a quest to create a new website from my existing one. My main use is the standard blog post but I also use Video embeds from Youtube.

    Now my previous theme (Gamepress) has a custom post type built-in just for that purpose. You can see it in the archives for one of my video categories here.

    Now I'm not entirely sure how to make a child theme and get into it, I'm not a WP developer, but I'd appreciate any help you can give me. I'd also be happy to share the results if you'd wanna add it to the theme. Standard Video post type seems like a good thing to have for most blogs.

    In case getting this type of functionality in the theme doesn't interest you at all, I'd just like to ask a few questions:

    1. I'm unfamiliar with responsive themes, when embedding videos I wanna center the video and make it an appropriate size, what size should I go for?
    2. Will you be putting in any custom post type options in the future? Such as options for front page display and interactions with the different post types?

    Thank you so much for any help and an incredible theme!

  2. KOKOStern
    Member
    Posted 7 months ago #

    I've managed to create a custom post type (called videos) and transfer everything properly from my previous website.

    I'm still unsure how to create a proper archives page that shows featured images nicely, but I'll get on to it.

    Right now I'd like to have my videos displayed on my home page like normal posts. I can't seem to find that functionality anywhere.

    There should be an option to choose what the front page shows in the reading section of the customize theme page. Allowing you to choose which post types to show. Will that be possible in a future update?

  3. KOKOStern
    Member
    Posted 7 months ago #

    I can't seem to find a way to show the custom post type on the homepage. That's a very important basic functionality. Are you planning to add that in the future?

  4. Scott Smith
    Member
    Theme Author

    Posted 7 months ago #

    Can you send me a link? I don't see why the videos wouldn't be appearing on the homepage or maybe I am misunderstanding you.

  5. KOKOStern
    Member
    Posted 7 months ago #

    I sent you an e-mail. Can you confirm you received it?

  6. Scott Smith
    Member
    Theme Author

    Posted 7 months ago #

    Yes, I've gotten it, but it got buried pretty quickly. I'll keep my response on the forums here:

    So the excerpts don't show the date under them when post excerpts are turned on. Sticky posts and non-excerpt posts will show the date. I think this needs to change and I'm adding it to my roadmap for the next release.

    I really appreciate you using Decode and your feedback. I'll land this feature in the next version, ok?

  7. Scott Smith
    Member
    Theme Author

    Posted 7 months ago #

    As for the videos, it seems to me like you'd want to change the post type to post, because the Index page shows posts and have the post format set to video. If you wanted to create a video page, perhaps show a page that just has posts with the video post format.

  8. KOKOStern
    Member
    Posted 6 months ago #

    First of all thanks for the response. It's not obvious in a totally free theme and I really appreciate it.

    Fixing the dates sounds great!

    About the vids, I want to have the two different post types:
    Normal posts - for blog posts.
    Videos - for videos.

    I have a very big database of videos already, and converting all of them is a hassle that I don't want to deal with. Having them separate also makes sense and allows me to do what I want with them.

    Will it be possible to just check for custom post types and have a check box for each "if you want to display them on front page".?

  9. Scott Smith
    Member
    Theme Author

    Posted 6 months ago #

    I think the best way to handle this is to add this to the functions.php.

    // Show posts of 'post', 'page' and 'movie' post types on home page
    add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
    
    function add_my_post_types_to_query( $query ) {
    	if ( is_home() && $query->is_main_query() )
    		$query->set( 'post_type', array( get_post_types() ) );
    	return $query;
    }

    I don't know if that will work, but I think that will do the trick. Please let me know if it works so I can integrate it with the theme if it works.

  10. KOKOStern
    Member
    Posted 6 months ago #

    Works perfectly.

    I'm using a child theme (with nothing in it currently) so I added it to my own function.php (which activates before the original, I'm assuming you know your way around child themes ^^).

    I do believe there should be an option to choose between all possible custom post types however. Like I mentioned before, you should put it up at the reading tab in the customize menu. Just putting everything might ruin it for some people.

    Thank you very much for all your help, I'm looking forward to the update and using your theme, and am very happy to learn you're actively supporting it here. Thank you very much!

    KOKOStern

  11. Scott Smith
    Member
    Theme Author

    Posted 6 months ago #

    I agree. I wanted to make sure it worked before I integrated it. 2.8.3 is complete and I've submitted it, but this is the first thing I'll add to the next release.

  12. KOKOStern
    Member
    Posted 6 months ago #

    Sounds great.

    The only thing that's left that I want to have are different types of archives for my videos. This is the part that might not be entirely relevant to the specific theme and might involve some more serious work so feel free to tell me if this just isn't interesting.

    I want to have different archives for my custom post type (videos) that show only the featured image, the title, the date and the category (taxonomy). In this way someone can go through a lot of videos at a glance and only watch what he wants. An example would be my current's theme video archives.

    Do you think that is something you can help with? Either by putting it as an option in the theme or simply by giving me some advice on how to do this (I'm really clueless as a web developer).

  13. Scott Smith
    Member
    Theme Author

    Posted 6 months ago #

    This would be a nice feature, I don't have a clue on how to build it, but then I didn't have a clue on how to make WordPress themes when I started work on Decode. :)

    I'll take a look at adding this, but I may reserve this sort of power-user feature for a premium theme if it takes too much time to develop. Just being honest. Decode is free and I can only afford to put so much time into it. I'm glad you like it.

    Oh, and I've added this feature to 2.8.4—no ETA on its release, I try to coalesce updates so each one is worthwhile.

  14. KOKOStern
    Member
    Posted 6 months ago #

    I see. Well I'll try and do it on my own with a child theme, not that I have any clue but like you said, a programmer is a programmer, you just gotta learn.

    Saving such a thing for a premium theme makes sense so you need not feel bad about it all. Make sure you have a sufficient amount of these specialized interesting features when going for premium one and make sure you understand - if you sell someone a theme, you're also selling proper support, and that could take a serious time investment.

    About updates - if you have a feature that works on nothing that you plan on working on right now, why not release it? It's 0 hassle and there's really no reason not to.

    Thanks again, and the best of luck to you!

    Edit: oh and looking into how my current theme is built might help with understanding how the custom archive works, so take a look: Gamepress

  15. Scott Smith
    Member
    Theme Author

    Posted 6 months ago #

    And I do release them soon, but they take about five days to get approved and I already have 2.8.3 is waiting to be approved so if I submit 2.8.4, it will get put at the bottom of the queue. I also want to wait to hear back if there are any bugs in that release so I can fix them ASAP. I did lots of refactoring in that release. Lastly, I don't want to release updates that only contain one or two non-critical changes, I'd rather wait two weeks and release an update with five neat changes and a big fix or something like that.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.