Tagged: x
-
AuthorPosts
-
August 3, 2016 at 4:18 am #1115114
RishParticipantHi,
I need to view my new recent updated posts in Ethos post carousel.
And if its possible that the recent post can be category wise as well.
Currently ,There are only options for Most Commented, Featured, and Random.I find two related posts
https://community.theme.co/forums/topic/how-to-set-order-by-for-recent_posts/https://community.theme.co/forums/topic/ethos-carousel-post-slider-recent-posts-option/
but i need the recent post in Ethos post carousel category wise.means whatever the recent updates coming in any category it will shown in the Ethos post carousel slider which running on top of the ethos site.
August 3, 2016 at 7:26 am #1115301
ChristianModeratorThis reply has been marked as private.August 3, 2016 at 7:36 am #1115312
RishParticipantThis reply has been marked as private.August 3, 2016 at 9:52 am #1115470
ChristianModeratorChange it to
<?php $args = array( 'post_type' => 'post' ); ?>For more options, please see https://codex.wordpress.org/Class_Reference/WP_Query. Since you’re dealing with PHP here, please take note that this might break your site in case you accidentally make a syntax error. In that case, please contact a web developer to investigate the custom code.
Thanks.
August 3, 2016 at 3:37 pm #1116043
RishParticipantGreat Christian, You are awesome:)
One more thing i need from you regarding php change in functions in feature.php
that i need the caption of images in feature gallery slider , how i can do it in below code, please i really need help on this ๐
// Featured Gallery
// =============================================================================if ( ! function_exists( ‘x_featured_gallery’ ) ) :
function x_featured_gallery() {$stack = x_get_stack();
$thumb = get_post_thumbnail_id( get_the_ID() );
$fullwidth = ( in_array( ‘x-full-width-active’, get_body_class() ) ) ? true : false;$args = array(
‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order’,
‘post_parent’ => get_the_ID(),
‘post_type’ => ‘attachment’,
‘post_mime_type’ => ‘image’,
‘post_status’ => null,
‘numberposts’ => -1,
‘exclude’ => $thumb
);$attachments = get_posts( $args );
if ( $attachments ) {
echo ‘<div class=”x-flexslider x-flexslider-featured-gallery man”><ul class=”x-slides”>’;
foreach ( $attachments as $attachment ) {
echo ‘<li class=”x-slide”>’;
if ( $fullwidth ) {
echo wp_get_attachment_image( $attachment->ID, ‘entry-fullwidth’, false, false );
} else {
echo wp_get_attachment_image( $attachment->ID, ‘entry’, false, false );
}
echo ‘‘;
}
echo ‘</div>’;}
}
endif;August 3, 2016 at 7:58 pm #1116397
Rue NelModeratorHello There,
Thanks for the updates! To display the image captions in the featured gallery slider, please add the following code in your child themeโs functions.php file
// Custom Featured Gallery displaying the image captions // ============================================================================= if ( ! function_exists( 'x_featured_gallery' ) ) : function x_featured_gallery() { $stack = x_get_stack(); $thumb = get_post_thumbnail_id( get_the_ID() ); $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false; $args = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => null, 'numberposts' => -1, 'exclude' => $thumb ); $attachments = get_posts( $args ); if ( $attachments ) { echo '<div class="x-flexslider x-flexslider-featured-gallery man"><ul class="x-slides">'; foreach ( $attachments as $attachment ) { $get_description = get_post($attachment->ID)->post_excerpt; echo '<li class="x-slide">'; if ( $fullwidth ) { echo wp_get_attachment_image( $attachment->ID, 'entry-fullwidth', false, false ); } else { echo wp_get_attachment_image( $attachment->ID, 'entry', false, false ); } if(!empty($get_description)){ //If description is not empty show the div echo '<div class="img-caption">' . $get_description . '</div>'; } echo '</li>'; } echo '</ul></div>'; } } endif; // =============================================================================And after that you also need to add the following css code in the customizer, Appearance > Customize > Custom > CSS
.x-flexslider .x-slides .x-slide { position: relative; } .x-flexslider .x-slides .x-slide .img-caption { position: absolute; top: auto; bottom: 0; width: 100%; background-color: rgba(0,0,0,0.5); color: #fff; padding: 10px; }You should be expecting something like this: http://prnt.sc/c1cff2

We would loved to know if this has work for you. Thank you.
August 4, 2016 at 2:11 am #1116850
RishParticipantThis reply has been marked as private.August 4, 2016 at 2:53 am #1116899
RupokMemberHi there,
That could be possible with some custom CSS. Would you provide exact URL of your site where you are using this?
Cheers!
August 4, 2016 at 4:27 am #1116973
RishParticipantThis reply has been marked as private.August 4, 2016 at 6:27 am #1117131
ChristianModeratorPlease add the code below in your Appearance > Customize > Custom > CSS
.x-flexslider .x-slides .x-slide .img-caption { position: static !important; }Further customizations from here would be getting into custom development, which 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. Thanks for understanding.
August 4, 2016 at 8:15 am #1117219
RishParticipantAwesome , You guys are best ๐
August 4, 2016 at 10:54 am #1117422
RahulModeratorYou’re welcome!
If you still have any further issues, do let us know. We’d be happy to assist you with everything.
Thanks for using the X-Theme.
August 5, 2016 at 5:33 am #1118688
RishParticipantLast thing i need to ask .. can we make it auto slide , as currently we have to, slide next manually.
August 5, 2016 at 2:03 pm #1119254
JadeModeratorHi there,
Please try adding following under Custom > JavaScript in the Customizer:
jQuery(window).load(function() { jQuery('.x-flexslider-featured-gallery').flexslider({ controlNav: false, animation: "fade", easing: "easeInOutExpo", slideshow: true }); });Hope this helps.
August 9, 2016 at 12:56 am #1123243
RishParticipantThis reply has been marked as private. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1115114 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
