Tagged: x
-
AuthorPosts
-
May 25, 2016 at 10:19 am #1009220
It seems as though the featured content option in ethos portfolio items is not available.
Why not? This seems crazy!
so if i want a portfolio items containing embedded youtube videos, i have to find some kind of relevant featured image or the portfolio items are all blank?
im scratching my head over this one!
i don’t want to use another stack as i’m using the post carousel.
Please help!regards,
Nick
May 25, 2016 at 11:40 am #1009362Hi Nick,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
May 25, 2016 at 3:43 pm #1009777This reply has been marked as private.May 25, 2016 at 8:27 pm #1010139Hello Nick,
Thank you for the credentials.
I am note sure what you are trying to achieve.
For portfolio item, if you happen to choose Video under Portfolio Settings > Media Type, it will display the video as Featured instead of an image. That is what happening on this portfolio item:http://thesunflowerjam.com/portfolio-item/history-of-the-sunflower-jam-2006-2009/
In case you still want to display featured image, please just add the video on the content part of portfolio item. and choose Image under Media Type.Hope this helps. If not, please clarify so we can help you better.
May 26, 2016 at 12:50 am #1010498if you look at this page from a site i built using icon http://thetemperancemovement.com/video/
you can clearly see that each video is shown as the featured image. this is because i have selected “media” as featured content.
Now look at the page i am currently working on http://thesunflowerjam.com/event-portfolio/
the portfolio items are blank as there is no option to display media as featured image.
I already have video selected as media type.
Do you now see the issue?kind regards,
Nick
May 26, 2016 at 1:17 am #1010535Hi there,
Thanks for updating. There is nothing on your given page – http://thesunflowerjam.com/event-portfolio/
However I went to another page (http://thesunflowerjam.com/video/) and noticed you didn’t set featured image for them. It’s because your are using a Youtube video as content which is not possible to show as featured image anyhow on this stack (since each stack has unique design and feature).
So let’s add a relevant (to your video) featured image and it will look like this – http://prntscr.com/b8jzzh
(I have tested and grabbed the screenshot).Hope this makes sense.
Cheers!
May 26, 2016 at 1:56 am #1010570I realise i haven’t set a featured image, that was the whole point of my original question!
Why is the featured content option not available? is there a reason why it cannot be added and can i not add the option with some customisation??
When posting a video as a portfolio item, i don’t want to then have to fiddle around grabbing a screen shot of a frame from the video to use as a featured image. It seems like a massive oversight to leave this option out on ethos stack and i don’t understand why on earth you would???????????May 26, 2016 at 2:07 am #1010579Hi there,
As I mentioned each stack has their own unique design and functionality so the question is repetitive. If you want to change the default behavior then you can do this with some custom development. This thread will help you I believe – https://community.theme.co/forums/topic/video-as-featured-image-for-video-post-in-ethos-blog-entry-list/#post-145249
Thanks
May 26, 2016 at 4:27 am #1010722Thank you for pointing me in the right direction to find a solution.
Unfortunately, it is not working.May 26, 2016 at 4:31 am #1010729This reply has been marked as private.May 26, 2016 at 9:51 am #1011165Hi Nick,
You can try this instead.
1. Create file _portfolio in wp-content/themes/x-child/framework/views/global then copy the code below into that file.
<?php // ============================================================================= // VIEWS/GLOBAL/_PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Includes the portfolio output. // ============================================================================= $stack = x_get_stack(); $entry_id = get_the_ID(); $paged = ( is_front_page() ) ? get_query_var( 'page' ) : ( ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1 ); $cols = get_post_meta( $entry_id, '_x_portfolio_columns', true ); $count = get_post_meta( $entry_id, '_x_portfolio_posts_per_page', true ); $filters = get_post_meta( $entry_id, '_x_portfolio_category_filters', true ); switch ( $cols ) { case 'One' : $cols = 1; break; case 'Two' : $cols = 2; break; case 'Three' : $cols = 3; break; case 'Four' : $cols = 4; break; } ?> <?php x_get_view( 'global', '_script', 'isotope-portfolio' ); ?> <div id="x-iso-container" class="x-iso-container x-iso-container-portfolio cols-<?php echo $cols; ?>"> <?php if ( count( $filters ) == 1 && in_array( 'All Categories', $filters ) ) { $args = array( 'post_type' => 'x-portfolio', 'posts_per_page' => $count, 'paged' => $paged ); } else { $args = array( 'post_type' => 'x-portfolio', 'posts_per_page' => $count, 'paged' => $paged, 'tax_query' => array( array( 'taxonomy' => 'portfolio-category', 'field' => 'id', 'terms' => $filters ) ) ); } $wp_query = new WP_Query( $args ); ?> <?php if ( $wp_query->have_posts() ) : ?> <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> <?php x_get_view( $stack, 'content', 'portfolio' ); ?> <?php endwhile; ?> <?php endif; ?> </div> <?php pagenavi(); ?> <?php wp_reset_query(); ?>
2. Create file content-portfolio.php in wp-content/themes/x-child/framework/views/ethos
Then copy this code into that file.<?php // ============================================================================= // VIEWS/ETHOS/CONTENT-PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Portfolio post output for Ethos. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php x_ethos_entry_top_navigation(); ?> <?php if ( ! x_is_portfolio_item() ) : ?> <div class="entry-featured"> <?php x_portfolio_item_featured_content(); ?> <div class="entry-cover"> <div class="entry-cover-content"> <span><?php echo get_post_meta( get_the_ID(), '_x_portfolio_media', true ); ?></span> <h2 class="entry-title entry-title-portfolio"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a> </h2> <span><?php echo get_the_date( 'm.d.y' ); ?></span> </div> </div> </div> <?php endif; ?> <div class="entry-wrap cf"> <?php if ( is_singular() ) : ?> <div class="entry-featured"> <?php x_portfolio_item_featured_content(); ?> </div> <?php x_get_view( 'global', '_content', 'the-content' ); ?> <div class="entry-extra"> <?php x_portfolio_item_project_link(); ?> <?php x_portfolio_item_tags(); ?> <?php x_portfolio_item_social(); ?> </div> <?php endif; ?> </div> </article>
3. Add this in Custom > Edit Global CSS in the customizer
.page-template-template-layout-portfolio .x-portfolio .x-video .entry-cover { display:none; }
As this is a custom development, further customizations from here is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. https://theme.co/community/custom-development/
May 26, 2016 at 1:46 pm #1011550am i adding .php to the end of the file name in step1. e.g. _portfolio.php ?
May 26, 2016 at 2:31 pm #1011625i followed your instructions and got this (attached)…
not quite what i expected.Attachments:
You must be logged in to view attached files.May 26, 2016 at 5:18 pm #1011863Hi Nick,
Yes, you will have to place .php file extension so that it will work.
I tried to login to using the FTP details you have provided but it seems to be incorrect. Would you mind checking the logins so that we could check this further? Thank you.
May 27, 2016 at 1:37 am #1012518This reply has been marked as private. -
AuthorPosts