Tagged: x
-
AuthorPosts
-
September 4, 2016 at 4:23 am #1160398
oziokoncParticipantgoodmorning.
I searched through the forum to see if i can display excerpt in the ethos carousel on http://www.pharmapproach.com and I have tried aall that was suggested but all to no avail. I am using the latest wordpress and xtheme version. below are the codes in my child theme function.php<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= <?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // Entry Cover // ============================================================================= function x_ethos_entry_cover( $location ) { if ( $location == 'main-content' ) { ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <a>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> <h2 class="h-entry-cover"><span><?php x_the_alternate_title(); ?></span></h2> </a> </article> <?php } elseif ( $location == 'post-carousel' ) { ?> <?php GLOBAL $post_carousel_entry_id; ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <a>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2> <div class="x-post-carousel-meta"> <?php echo get_the_excerpt(); ?> </div> </a> </article> <?php } } function _category_dropdown_filter( $cat_args ) { $cat_args['show_option_none'] = __('View Our Services'); return $cat_args; } add_filter( 'widget_categories_dropdown_args', '_category_dropdown_filter' ); if ( ! function_exists( 'x_breadcrumbs' ) ) : function x_breadcrumbs() { if ( x_get_option( 'x_breadcrumb_display', 1 ) && function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } } endif; // Add custom page title in Fullwidth page template // ============================================================================= function add_custom_page_title(){ ?> <?php if ( is_single() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1> </header> <?php endif; ?> <?php } add_action( 'x_after_view_ethos__landmark-header', 'add_custom_page_title' ); // ============================================================================= // Add sidebar to individual product page // ============================================================================= if ( ! function_exists( 'x_get_content_layout' ) ) : function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'content-sidebar' ); if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; } elseif ( x_is_portfolio_item() ) { $layout = 'full-width'; } elseif ( x_is_portfolio() ) { $meta = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta; } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) { $layout = 'content-sidebar'; } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) { $layout = 'sidebar-content'; } elseif ( is_page_template( 'template-layout-full-width.php' ) ) { $layout = 'full-width'; } elseif ( is_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $opt = x_get_option( 'x_woocommerce_shop_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_404() ) { $layout = 'full-width'; } else { $layout = $content_layout; } } else { $layout = $content_layout; } return $layout; } endif; // ============================================================================= if ( ! function_exists( 'x_excerpt_length' ) ) : function x_excerpt_length( $length ) { return x_get_option( 'x_blog_excerpt_length', '120' ); } add_filter( 'excerpt_length', 'x_excerpt_length' ); endif;January 6, 2016 at 9:57 pm
September 4, 2016 at 5:23 am #1160446
ChristopherModeratorHi there,
Please check your URL, it doesn’t work.
Please update your code in child theme’s functions.php file to :
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= // Entry Cover // ============================================================================= function x_ethos_entry_cover( $location ) { if ( $location == 'main-content' ) { ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <a>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> <h2 class="h-entry-cover"><span><?php x_the_alternate_title(); ?></span></h2> </a> </article> <?php } elseif ( $location == 'post-carousel' ) { ?> <?php GLOBAL $post_carousel_entry_id; ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <a>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2> <div class="x-post-carousel-meta"> <?php echo get_the_excerpt(); ?> </div> </a> </article> <?php } } function _category_dropdown_filter( $cat_args ) { $cat_args['show_option_none'] = __('View Our Services'); return $cat_args; } add_filter( 'widget_categories_dropdown_args', '_category_dropdown_filter' ); if ( ! function_exists( 'x_breadcrumbs' ) ) : function x_breadcrumbs() { if ( x_get_option( 'x_breadcrumb_display', 1 ) && function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } } endif; // Add custom page title in Fullwidth page template // ============================================================================= function add_custom_page_title(){ ?> <?php if ( is_single() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1> </header> <?php endif; ?> <?php } add_action( 'x_after_view_ethos__landmark-header', 'add_custom_page_title' ); // ============================================================================= // Add sidebar to individual product page // ============================================================================= if ( ! function_exists( 'x_get_content_layout' ) ) : function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'content-sidebar' ); if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; } elseif ( x_is_portfolio_item() ) { $layout = 'full-width'; } elseif ( x_is_portfolio() ) { $meta = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta; } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) { $layout = 'content-sidebar'; } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) { $layout = 'sidebar-content'; } elseif ( is_page_template( 'template-layout-full-width.php' ) ) { $layout = 'full-width'; } elseif ( is_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $opt = x_get_option( 'x_woocommerce_shop_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_404() ) { $layout = 'full-width'; } else { $layout = $content_layout; } } else { $layout = $content_layout; } return $layout; } endif; // ============================================================================= if ( ! function_exists( 'x_excerpt_length' ) ) : function x_excerpt_length( $length ) { return x_get_option( 'x_blog_excerpt_length', '120' ); } add_filter( 'excerpt_length', 'x_excerpt_length' ); endif;Hope it helps.
September 4, 2016 at 8:06 am #1160530
oziokoncParticipantThanks for replying. the code still does not work. the url http://www.pharmapproach.com is correct and opens in every other browser except in google chrome. and this started when i was trying to fix the ethos caruosel except before i contacted you initially
September 4, 2016 at 8:50 am #1160561
ThaiModeratorHi There,
In this case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link login to your site
– WordPress Admin username / Password
– FTP AccountDon’t forget to select Set as a private reply. This ensures your information is only visible to our staff.
Thanks.
September 4, 2016 at 9:20 am #1160578
oziokoncParticipantThis reply has been marked as private.September 4, 2016 at 11:22 am #1160682
oziokoncParticipantjust recently noticed that when a post loads the carousel displays codes instead of pictures
September 4, 2016 at 3:31 pm #1160818
RadModeratorHi there,
It’s because of this, and there are two of them
<a>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">Please change it to this,
<a href="<?php echo get_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1160398 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
