Tagged: x
-
AuthorPosts
-
June 21, 2016 at 6:44 pm #1053379
LelyModeratorThis reply has been marked as private.June 22, 2016 at 1:14 am #1053822
Pbalazs89ParticipantThis reply has been marked as private.June 22, 2016 at 2:28 pm #1054931
RadModeratorHi there,
I have exactly the same setting as your screenshot, and it’s not working.
Though, Cpanel’s file manager should be okay now. I confirmed that it works when language URL structure is set to ?lang=en.
Would you mind installing a child theme first? It’s recommended for testing and applying the custom code.
Thanks!
June 24, 2016 at 1:25 am #1057656
Pbalazs89ParticipantHi,
I installed the child theme. Unfortunately it doesn’t fix the issue.
Thanks!
June 24, 2016 at 2:32 am #1057728
RadModeratorThis reply has been marked as private.June 24, 2016 at 3:07 am #1057749
Pbalazs89ParticipantThis reply has been marked as private.June 24, 2016 at 4:47 pm #1058585
RadModeratorHi there,
Found it, please create this file into your child theme
/wp-content/themes/x-child/framework/views/global/_portfolio.php
On that file, please add this content,
<?php // ============================================================================= // VIEWS/GLOBAL/_PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Includes the portfolio output. // ============================================================================= $stack = x_get_stack(); $entry_id = get_the_ID(); global $sitepress; if ( function_exists( 'icl_object_id' ) && is_callable( array( $sitepress, 'get_current_language' ) ) ) { $wpml_post = get_post( icl_object_id( $entry_id, 'page', false, $sitepress->get_current_language() ) ); $entry_id = $wpml_post->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' => 'term_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 if ( $stack != 'ethos' ) : ?> <?php x_get_view( $stack, 'content', 'portfolio' ); ?> <?php else : ?> <?php x_ethos_entry_cover( 'main-content' ); ?> <?php endif; ?> <?php endwhile; ?> <?php endif; ?> </div> <?php pagenavi(); ?> <?php wp_reset_query(); ?>That should fix it, and make sure that your portfolio home page and items has independent translation (not sync to their other language counterpart)
Cheers!
June 27, 2016 at 3:33 am #1061119
Pbalazs89ParticipantHi there, I’ve done the steps and created a new english portfolio item to test it, but it still doesn’t show up.
Any ideas?
Thanks!
June 27, 2016 at 6:10 pm #1062317
LelyModeratorHi There,
You should also create a new portfolio index page. Both portfolio homepage and items should be independent as Rad previously suggested.
Hope this helps.
July 1, 2016 at 4:33 am #1068127
Pbalazs89ParticipantThank you very much, I appreciate your help!
Everything works fine now except one thing. If I’m on the portfolio page, the language switcher does not work. It works fine on all the other pages. Any idea as to why?
Thanks!
July 1, 2016 at 3:38 pm #1068831
RadModeratorHi there,
You created separate portfolio home page for each language. It’s wrong, you’re supposed to duplicate your original portfolio home page using WPML’s duplicate functionality, then switch edit the portfolio translated/duplicate page and click independent translation, it’s not the indepedent page but translation.
Thanks!
August 24, 2016 at 3:21 am #1144375
Pbalazs89ParticipantHi there,
I’ve setup a site, and would like to include the language switcher in the topbar on the right.
I’ve added this code to the child theme’s _topbar.php file in frameworks / views / global
?> <?php if ( x_get_option( 'x_topbar_display', 0 ) == 1 ) : ?> <div class="x-topbar"> <div class="x-topbar-inner x-container-fluid max width"> <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p> <?php endif; ?> <?php x_social_global(); ?> <div class="wpml-selector"><?php do_action('icl_language_selector'); ?></div> </div> </div> <?php endif; ?>Other than that I’ve added some CSS so the DIV should float:right;, but the language selector does not seem to appear. Any ideas why this might be?
Ohh yeah, the url is http://decorolux2.decorolux.com
August 24, 2016 at 4:05 pm #1145405
RadModeratorHi there,
Your child theme is not active, you should activate it first before testing.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1046738 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
