www.quality4yourlife.com
Neues Mitglied
Hallo,
ich habe folgenden Code in einem Theme:
Hoffentlich reicht der Auszug.
Der Code lädt einen Content in einen DIV Container. Oben ist im DIV Container eine Navigation, darunter wird der jeweilige Text eingeblendet, je nach dem, auf welchen Menüpunkt geklickt wird.
Mein Problem ist aber, dass ich den DIV in dem das Menü ist, schließen will und den Inhalt in einen neuen Div Conteiner laden möchte. Mache ich das, klappt das Skript nicht mehr.
Hättet ihr eine Idee, was mach anpassen könnte oder wo ich ansetzen sollte?
lg
ich habe folgenden Code in einem Theme:
- <div class="tabs">
- <ul class="tabNavigation">
- <?php
- if(of_get_option('homepage_content', 'yes') == 'yes'):
- ?>
- <li><a href="#main"><?php the_title(); ?></a></li>
- <?php
- endif;
- ?>
- <?php
- if(of_get_option('latest_video_tab', 'yes') == 'yes'):
- ?>
- <li><a href="#latest"><?php echo of_get_option('latest_videos_tab_text', 'Latest Videos'); ?></a></li>
- <?php
- endif;
- ?>
- <?php
- if(of_get_option('recommended_vids', 'no') == 'yes'):
- ?>
- <li><a href="#recommendations"><?php echo of_get_option('recommended_tab_text', 'Recommendations'); ?></a></li>
- <?php
- endif;
- ?>
- <?php
- if(of_get_option('popular_vids', 'no') == 'yes'):
- ?>
- <li><a href="#popular"><?php echo of_get_option('popular_tab_text', 'Popular Videos'); ?></a></li>
- <?php
- endif;
- ?>
- <?php
- if(of_get_option('more_vids', 'no') == 'yes'):
- ?>
- <li><a href="#more"><?php echo of_get_option('more_vids_tab_text', 'More Videos'); ?></a></li>
- <?php
- endif;
- ?>
- <?php
- $args = array(
- 'post_type' => 'page',
- 'numberposts' => -1,
- 'post_status' => null,
- 'post_parent' => of_get_option('features_parent_page'),
- 'order' => 'ASC',
- 'orderby' => 'menu_order'
- );
- $slides = get_posts($args);
- if($slides):
- foreach($slides as $post): setup_postdata($post);
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'content-slider');
- ?>
- <li>
- <a href="#<?php
- $title = get_the_title();
- $loweredTitle = strtolower($title);
- echo str_replace(" ", "_", $loweredTitle);
- ?>"><?php the_title(); ?></a>
- </li>
- <?php endforeach; endif;?>
- <div class="clearfix"></div>
- </ul>
- <?php
- endwhile;
- ?>
- <?php
- if(of_get_option('homepage_content', 'yes') == 'yes'):
- ?>
- <div id="main">
- <?php rewind_posts(); ?>
- <?php
- if(have_posts())
- while(have_posts()):
- the_post();
- ?>
- <?php the_content(); ?>
- <?php
- endwhile;
- ?>
- <div class="home-page-older"></div>
- </div>
- <?php
- endif;
- ?>
- <?php
- if(of_get_option('latest_video_tab', 'yes') == 'yes'):
- ?>
- <div id="latest">
- <?php
- //fetch posts based on our taxonomy (for 'portfolio' custom post type)
- $tabbed_number_posts = of_get_option('tabbed_number_posts','24');
- $args = array(
- 'numberposts' => $tabbed_number_posts,
- 'post_type' => 'portfolio',
- 'post_type' => 'portfolio',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'p_type',
- 'field' => 'slug',
- 'terms' => 'featured',
- 'operator' => 'NOT IN'
- )
- )
- );
- $featured_posts = get_posts($args);
- include 'tabbed-vids.php';
- ?>
- <div class="home-page-older"></div>
- </div>
- <?php
- endif;
- ?>
- <?php
- if(of_get_option('recommended_vids', 'yes') == 'yes'):
- ?>
- <div id="recommendations">
- <?php
- //fetch posts based on our taxonomy (for 'portfolio' custom post type)
- $tabbed_number_posts = of_get_option('tabbed_number_posts','24');
- //$portfolio_type = get_post_meta($post->ID, 'p_type', true);
- //echo '<br /> portfolio_type get post meta: '.$portfolio_type.'<br />';
- $args = array(
- 'numberposts' => $tabbed_number_posts,
- 'post_type' => 'portfolio',
- 'p_type' => 'recommended'
- );
- $featured_posts = get_posts($args);
- include 'tabbed-vids.php';
- ?>
- </div>
Hoffentlich reicht der Auszug.
Der Code lädt einen Content in einen DIV Container. Oben ist im DIV Container eine Navigation, darunter wird der jeweilige Text eingeblendet, je nach dem, auf welchen Menüpunkt geklickt wird.
Mein Problem ist aber, dass ich den DIV in dem das Menü ist, schließen will und den Inhalt in einen neuen Div Conteiner laden möchte. Mache ich das, klappt das Skript nicht mehr.
Hättet ihr eine Idee, was mach anpassen könnte oder wo ich ansetzen sollte?
lg