Odpowiedź forum utworzona

Viewing 9 replies - 16 through 24 (of 24 total)
  • Twórca wątku Aga83

    (@aga83)

    Tak, slajdy się wyświetlają ale chciałabym żeby slajd pierwszy pokazywał się tylko na podstronie o mnie, a na głównej żeby się nie pokazywal.

    Twórca wątku Aga83

    (@aga83)

    http://a-grafka.net/rehabilitacja/

    Przy okazji czy jest jakiś sposób na uniknięcie krzaczków w miejsce polskich znaków przy przenoszeniu strony? Zakładam, że to jakiś problem z kodowaniem?

    Twórca wątku Aga83

    (@aga83)

    W razie czego wrzuce jeszcze wieczorem strone na serwer bo mam obecnie na localhost.

    Twórca wątku Aga83

    (@aga83)

    <?php
    /**
     * The header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package accesspress_parallax
     */
    ?>
    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <!--[if lt IE 9]>
    	<script src="<?php echo get_template_directory_uri(); ?>/js/html5shiv.js"></script>
    <![endif]-->
    
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<header id="masthead" class="<?php echo of_get_option('header_layout'); ?>">
    		<div class="mid-content clearfix">
    		<div id="site-logo">
    		<?php if ( get_header_image() ) : ?>
    		<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    			<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>">
    		</a>
    		<?php else:?>
    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    		<?php endif; ?>
    		</div>
    
    		<nav id="site-navigation" class="main-navigation">
    		<div class="menu-toggle"><?php _e( 'Menu', 'accesspress-parallax' ); ?></div>
    
    			<?php
    			$sections = of_get_option('parallax_section');
    			if(of_get_option('enable_parallax') == 1 && of_get_option('enable_parallax_nav') == 1):
    			?>
    			<ul class="nav single-page-nav">
    				<?php
    				$home_text = of_get_option('home_text');
    				if(of_get_option('show_slider')== "yes" && !empty($home_text)) : ?>
    					<li class="current"><a href="<?php echo esc_url( home_url( '/' ) ); ?>#main-slider"><?php echo esc_attr($home_text); ?></a></li>
    				<?php endif;
    
    				if(!empty($sections)):
    				foreach ($sections as $single_sections):
    					if($single_sections['layout'] != "action_template" && $single_sections['layout'] != "blank_template" && $single_sections['layout'] != "googlemap_template" && !empty($single_sections['page'])) :
    					$title = get_the_title($single_sections['page']); ?>
    					<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>#section-<?php echo $single_sections['page']; ?>"><?php echo $title; ?></a></li>
    					<?php
    					endif;
    				endforeach;
    				endif; ?>
    			</ul>
    			<?php
    			else:
    				wp_nav_menu( array(
    				'theme_location' => 'primary' ,
    				'container'      => false
    				) );
    			endif; ?>
    
    		</nav><!-- #site-navigation -->
    		</div>
    
    		<?php
    		if(of_get_option('show_social') == 1):
    			do_action('accesspress_social');
    		endif; ?>
    	</header><!-- #masthead -->
    
    	<?php
    	$accesspress_show_slider = of_get_option('show_slider') ;
    	$content_class = "";
    	if(empty($accesspress_show_slider) || $accesspress_show_slider == "yes"):
    		$content_class = "y-seslider";
    	endif;
    	?>
    	<div id="content" class="site-content <?php echo $content_class; ?>">
    	<?php
    	if(is_home() || is_front_page() || is_page(83))  :
    
    		do_action('accesspress_bxslider');
    	endif;
    	?>
    Twórca wątku Aga83

    (@aga83)

    Niestety jak dodaje shortcode to slajder pokazuje się w złym miejscu.
    Czy przy obecnym rozwiązaniu można ustawić jakiś warunek żeby page 83 wyświetlała tylko slajd 1 (post 589), a home wyświetlała wszystkie oprocz slajdu 1?

    Tak wygląda kod w sekcji header.php:

    <?php
    $home_text = of_get_option(’home_text’);
    if(of_get_option(’show_slider’)== „yes” && !empty($home_text)) : ?>
    <li class=”current”>#main-slider”><?php echo esc_attr($home_text); ?>
    <?php endif;

    if(!empty($sections)):
    foreach ($sections as $single_sections):
    if($single_sections[’layout’] != „action_template” && $single_sections[’layout’] != „blank_template” && $single_sections[’layout’] != „googlemap_template” && !empty($single_sections[’page’])) :
    $title = get_the_title($single_sections[’page’]); ?>

    • #section-<?php echo $single_sections[’page’]; ?>”><?php echo $title; ?>
    • <?php
      endif;
      endforeach;
      endif; ?>

      <?php
      else:
      wp_nav_menu( array(
      'theme_location’ => 'primary’ ,
      'container’ => false
      ) );
      endif; ?>

      </nav><!– #site-navigation –>
      </div>

      <?php
      if(of_get_option(’show_social’) == 1):
      do_action(’accesspress_social’);
      endif; ?>
      </header><!– #masthead –>

      <?php
      $accesspress_show_slider = of_get_option(’show_slider’) ;
      $content_class = „”;
      if(empty($accesspress_show_slider) || $accesspress_show_slider == „yes”):
      $content_class = „y-seslider”;
      endif;
      ?>
      <div id=”content” class=”site-content <?php echo $content_class; ?>”>
      <?php
      if(is_home() || is_front_page() || is_page(83)) :

      do_action(’accesspress_bxslider’);
      endif;
      ?>

    Twórca wątku Aga83

    (@aga83)

    Nie bardzo rozumiem, gdzie mam utworzony shortcode wkleić…

    Twórca wątku Aga83

    (@aga83)

    Teraz mam kolejne wyzwanie: na każdej podstronie wyświetla się inny slajd 🙂
    Zaczynam searching ale będę wdzięczna za każdą podpowiedź!

    Twórca wątku Aga83

    (@aga83)

    uff podstawy php zaliczone 🙂 doszłam do tego:

    if(is_home() || is_front_page() || is_page(83)) :

    do_action(’accesspress_bxslider’);
    endif;
    ?>

    Twórca wątku Aga83

    (@aga83)

    Niestety to nie działa. Muszę chyba jakoś wywołać ten slajder na wybranych podstronach poprzez edycje tego komunikatu w header:

    <?php
    if(is_home() || is_front_page()) :
    do_action(’accesspress_bxslider’);
    endif;
    ?>

    Jeśli chcę żeby ten slajder wyświetlił się np na podstronie (strona nie wpis) o id 898 to jak zmienić zapis?

Viewing 9 replies - 16 through 24 (of 24 total)