Portfolio as opposed to blog posts in Ethos Carousal

Hi Support,

would it be possible to swap the blog posts in ethos carousal to portfolio posts? The picture would never change and would simply link to the portfolio category so there might be another way to achieve what i am looking for but i like the layout of the ethos theme 1 demo so would like to keep it like that.

Craig

Hi Craig,

I am not exactly sure what you want to achieve given that you want to change source of the carousel but the image would stay? When the source of the carousel change, everything will change depending on the details of the post or portfolio.

The file for that is _post-carousel.php on this folder: \wp-content\themes\x\framework\legacy\cranium\headers\views\ethos. Copy that file on the same folder on your child theme here: \wp-content\themes\x-child\framework\legacy\cranium\headers\views\ethos. Then update as necessary.

Hi Lely,

Thank you for your reply. I would prefer not doing all the custom styling in a child theme. Is there possibly another way without setting up a child theme?

Possibly but putting a gallery image above the header of something? Or could i just change the link to where it would go to just go to the portfolio?
Thank you

If i could just change the link address of each carousal that would actually be perfect.

Is the possible?

Hello There,

Thanks for updating in! By default, the post carousel will display the posts. If you want to display portfolio or even change the links would still require template customizations. Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

Once you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/ETHOS/_POST-CAROUSEL.PHP
// -----------------------------------------------------------------------------
// Outputs the post carousel that appears at the top of the masthead.
// =============================================================================

GLOBAL $post_carousel_entry_id;

$post_carousel_entry_id = get_the_ID();

$is_enabled = x_get_option( 'x_ethos_post_carousel_enable' ) == '1';
$count      = x_get_option( 'x_ethos_post_carousel_count' );
$display    = x_get_option( 'x_ethos_post_carousel_display' );

switch ( $display ) {
  case 'most-commented' :
    $args = array(
      'post_type'      => 'x-portfolio',
      'posts_per_page' => $count,
      'orderby'        => 'comment_count',
      'order'          => 'DESC'
    );
    break;
  case 'random' :
    $args = array(
      'post_type'      => 'x-portfolio',
      'posts_per_page' => $count,
      'orderby'        => 'rand'
    );
    break;
  case 'featured' :
    $args = array(
      'post_type'      => 'x-portfolio',
      'posts_per_page' => $count,
      'orderby'        => 'date',
      'meta_key'       => '_x_ethos_post_carousel_display',
      'meta_value'     => 'on'
    );
    break;
}

?>

<?php if ( $is_enabled ) : ?>

  <ul class="x-post-carousel unstyled">

    <?php $wp_query = new WP_Query( $args ); ?>

    <?php if ( $wp_query->have_posts() ) : ?>
      <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

        <li class="x-post-carousel-item">
          <?php x_ethos_entry_cover( 'post-carousel' ); ?>
        </li>

      <?php endwhile; ?>
    <?php endif; ?>

    <?php wp_reset_query(); ?>

    <script>

    jQuery(document).ready(function() {
      jQuery('.x-post-carousel').slick({
        speed          : 500,
        slide          : 'li',
        slidesToShow   : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_large' ); ?>,
        slidesToScroll : 1,
        rtl            : <?php echo json_encode( is_rtl() ); ?>,
        responsive     : [
          { breakpoint : 1500, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_large' ); ?> } },
          { breakpoint : 1200, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_medium' ); ?> } },
          { breakpoint : 979,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_small' ); ?> } },
          { breakpoint : 550,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_small' ); ?> } }
        ]
      });
    });

    </script>

  </ul>

<?php endif; ?>

3] Save the file named as _post-carousel.php
4] Upload this file to your server in the child theme’s folder /wp-content/themes/x-child/framework/legacy/cranium/headers/views/ethos/

We would loved to know if this has work for you. Thank you.

Hi RueNel,

I have activated the child theme and saved the file with the code on it.

So far so good!! Exactly like i wanted. How do i specify which portfolio images i would like to be there on the carousal now? It is the four i have up currently but would like them in a different order. It must be those four only.

Also for some reason none of my portfolio images are showing on my portfolio page now?

Hey There,

Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at pinnacle@theme.co if this is of interest to you. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

Thank you for your understanding.

hahaha nice! buy your theme as the bait and then tell me to do it as a child theme that i have no clue on purely so you could bait me into having to pay more money.

NOT HAPPY

Fine i will have to live with the randomised portfolio posts, Can you at least help me with why my portfolio is not displaying?

Hello Craig,

Please, could you provide temporary WP credentials? This way, we can check some settings in your portfolio.

Hi John,

Please find username and password below in secure note

Hello,

I`ve checked your site and your portfolio are displaying, but above the header (this is happening because of some customization applied).

Hi John,

Yes i wanted the portfolio to display in the header. is it not possible to get it to display normally on the portfolio page as well?

Hi There,

I can see the issue on your portfolio page. I just click save all settings again and it is now displaying the portfolio items. See this: https://screencast-o-matic.com/watch/cbihiKl2Xv

Hi Lely,

Great thanks!!! thats perfect. Is it possible to link to a certain category on the portfolio page? Eg Nature and only the nature portfolio items display? :slight_smile:

Hi There,

You’re always welcome.
Unfortunately, I am not exactly sure how you want it. I will just laid out what is possible with the default available features.
1.) Like what you have right now in Portfolio page, we can display everything with filter.
2.) We can add another page, let say Nature Portfolio > Choose Layout - Portfolio as page template too and then on Portfolio settings > Under Category Select : Choose specific category like Nature. This page will then display all nature portfolio in the same manner. You can repeat this process on other categories.

Now, editing how it currently looks is always possible but it will entail customization depending how you want. Customization is beyond the scope of support we can offer. We’re sorry if you felt that we’re just baiting you to pay more money. That is not really the case. What we really mean is we just want you to get started on want you want to achieve and show you how things can be done and then you have to pick from there if you want more changes. Thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.