Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter d_3dpowen

    (@d_3dpowen)

    Thanks a lot. I found the problem.

    Thanks for your time Fatima

    Thread Starter d_3dpowen

    (@d_3dpowen)

    Hello Fatima,
    this is the link link

    thanks a lot

    Thread Starter d_3dpowen

    (@d_3dpowen)

    Hello Fatima,
    thank you for the information, replacing the top-most.php and the header.php file in my child theme with the new version of powen lite gets back my menu and search bar.
    I have another question sorry! Now if I select top menu, the menu is showing, If I select Main Menu it doesn’t (I mean in personalize page of the theme and in the menu appareance of wordpress too).
    do you know why?

    thank you

    Thread Starter d_3dpowen

    (@d_3dpowen)

    Hello Fatima,
    I’ve already add the menu to the location. In my backend I can add theme location from Dashboard > Appearance > Menus and from Dashboard > Appearance > Personalize too. I’m using a child theme to avoid this problems but since you have modified the menu and the search box I think the problem is the child theme. For example I have a modified version of header.php for my purpose.
    Ad I noticed that in new powen lite version header.php doesn’t have a Main Nav section. In fact in my source now I see two main nav: one coming from my theme child (header.php) and the second coming from new version of the powen main theme. If I name my menu it shows up (and it is comind from my header.php child theme). If i don’t name it it doesn’t show up.
    Maybe is it the problem? If yes which file calls the new version of the nav menu and the search box?
    thank you

    Thread Starter d_3dpowen

    (@d_3dpowen)

    Hello Fatima,
    I found a solution, maybe could be useful for someone else.
    I have 4 slides in Italian, I want 4 slides in English.

    So I created 8 slides in the personalization page of the theme, and then in banner.php I have put this code:

    <?php
    /**
     * Tempate part used in index.php for showing flexslider
     * @package powen
     */
    
    $slides = get_theme_mod( 'powen_slides', powen_default_slides() );
    $suben = array_slice( $slides, 4, null, true);
    $subit = array_slice( $slides, 0, 4);
    ?>
    
    <?php if( ! powen_mod( 'hide_slider' , false ) ) :  ?>
    <div id="powen-main-slider" class="clear">
    	<section id="slider" class="flexslider">
    		<ul class='slides'>
    
    		<?php if( is_array( $subit ) && get_locale() == 'it_IT' ) : foreach ( $subit as $slide) : ?> 
    
    		<?php
    				$slide_title       = isset( $slide['title'] ) ? $slide['title'] : false;
    				$slide_link        = isset( $slide['link'] ) ? $slide['link'] : false;
    				$slide_image       = isset( $slide['image'] ) ? $slide['image'] : false;
    				$slide_description = isset( $slide['description'] ) ? $slide['description'] : false;
    
    			if( ! trim( $slide_image ) ) continue; ?>
    
    <li>
    				<a href='<?php echo esc_url( $slide_link ); ?>'>
    					<img src='<?php echo esc_url( $slide_image ); ?>' alt='image'>
    					<?php if( $slide_title || $slide_description ) { ?>
    					<div class='powen-slider-content animated slideInUp'>
    						<h6 class="powen-slider-title"><?php echo esc_attr( $slide_title ); ?></h6>
    						<p class="powen-slider-description"><?php echo esc_attr( $slide_description ); ?></p>
    					</div>
    					<?php } ?>
    				</a>
    			</li>
    
    <?php endforeach; endif; ?>
    
    		<?php if( is_array( $suben ) && get_locale() == 'en_GB' ) : foreach ( $suben as $slide) : ?> 
    
    		<?php
    				$slide_title       = isset( $slide['title'] ) ? $slide['title'] : false;
    				$slide_link        = isset( $slide['link'] ) ? $slide['link'] : false;
    				$slide_image       = isset( $slide['image'] ) ? $slide['image'] : false;
    				$slide_description = isset( $slide['description'] ) ? $slide['description'] : false;
    
    			if( ! trim( $slide_image ) ) continue; ?>
    
    	<li>
    				<a href='<?php echo esc_url( $slide_link ); ?>'>
    					<img src='<?php echo esc_url( $slide_image ); ?>' alt='image'>
    					<?php if( $slide_title || $slide_description ) { ?>
    					<div class='powen-slider-content animated slideInUp'>
    						<h6 class="powen-slider-title"><?php echo esc_attr( $slide_title ); ?></h6>
    						<p class="powen-slider-description"><?php echo esc_attr( $slide_description ); ?></p>
    					</div>
    					<?php } ?>
    				</a>
    			</li>
    
    		<?php endforeach; endif; ?>
    
    		</ul>
    	</section>
    </div>
    <?php endif; ?>

    with this I select the 1,2,3,4 slides ( $subit = array_slice( $slides, 0, 4); )
    whit this I select the 5,6,7,8 slides ( $suben = array_slice( $slides, 4, null, true); )

    Then every foreach verifies the current language and returns the right slides.
    For sure is not an elegant solution but I think that is a good solution for a so small array.

    If you have an elegant solution let me know ??
    Thank you for the support

    Thread Starter d_3dpowen

    (@d_3dpowen)

    Hello Fatima,
    Thanks for the reply. Maybe I wasn’t clear. I meant that for any other content the translation is working fine. For the slider I don’t know where I have to put the english content (it is an italian site). In the personalization page of the theme i can put italian content(title,description,image,link) but there is no option for another language.

    Am i doing something wrong? ??

Viewing 6 replies - 1 through 6 (of 6 total)