themexpert / docs

ThemeXpert Documenation Repository
3 stars 3 forks source link

Error in homepage.php #5

Open dinkyfriend opened 8 years ago

dinkyfriend commented 8 years ago

There seems to be a bug in homepage.php in the switch wp theme. If you change the slider titles and contents in the wp backend, only slider 1 is published correctly. Slider 2 and 3 are not updated in the frontend.

I changed the code accordingly and now it works. You might want to update the homepage.php file. Other than that, awesome theme!

Cheers Dario

<?php /**

get_header(); ?>

<?php global $tx_switch; ?>

    <section id="hero-unit" class="clearfix">
        <div id="carousel" class="carousel slide" data-ride="carousel" data-interval="false">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel" data-slide-to="0" class="active"></li>
                <li data-target="#carousel" data-slide-to="1"></li>
                <li data-target="#carousel" data-slide-to="2"></li>
            </ol>
            <!-- Wrapper for slides -->
            <div class="carousel-inner ">
                <div class="item active slider-1" style="background-image: url('<?php echo $img = $tx_switch['slider1_bg']['url']; ?>');">
                    <div class="carousel-caption ">
                        <h1 class="animated animate-delay-1 slideInRight"><?php echo $textarea = $tx_switch['slider1_heading']; ?></h1>
                        <p class="animated animate-delay-2 fadeInLeft ">
                            <?php echo $textarea = $tx_switch['slider1_description']; ?>
                        </p>
                        <div class="animated fadeInUp animate-delay-3">
                            <div class="btn-line">
                                <a href="<?php echo $textarea = $tx_switch['slider1_button_link']; ?>">

                                    <p><?php echo $textarea = $tx_switch['slider1_button_text']; ?></p>
                                    <span class="top"></span>
                                    <span class="right"></span>
                                    <span class="bottom"></span>
                                    <span class="left"></span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="item slider-2" style="background-image: url('<?php echo $img = $tx_switch['slider2_bg']['url']; ?>');">
                    <div class="carousel-caption">
                        <h1 class="animated animate-delay-1 slideInRight"><?php echo $textarea = $tx_switch['slider2_heading']; ?></h1>
                        <p class="animated animate-delay-2 fadeInLeft ">
                            <?php echo $textarea = $tx_switch['slider2_description']; ?>
                        </p>
                        <div class="animated fadeInUp animate-delay-3">
                            <div class="btn-line">
                                <a href="<?php echo $textarea = $tx_switch['slider2_button_link']; ?>">

                                    <p><?php echo $textarea = $tx_switch['slider2_button_text']; ?></p>
                                    <span class="top"></span>
                                    <span class="right"></span>
                                    <span class="bottom"></span>
                                    <span class="left"></span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="item slider-3" style="background-image: url('<?php echo $img = $tx_switch['slider3_bg']['url']; ?>');">
                    <div class="carousel-caption">
                        <h1 class="animated animate-delay-1 slideInRight"><?php echo $textarea = $tx_switch['slider3_heading']; ?></h1>
                        <p class="animated animate-delay-2 fadeInLeft ">
                            <?php echo $textarea = $tx_switch['slider3_description']; ?>
                            </p>

                        <div class="animated fadeInUp animate-delay-3">
                            <div class="btn-line">
                                <a href="<?php echo $textarea = $tx_switch['slider3_button_link']; ?>">

                                    <p><?php echo $textarea = $tx_switch['slider3_button_text']; ?></p>
                                    <span class="top"></span>
                                    <span class="right"></span>
                                    <span class="bottom"></span>
                                    <span class="left"></span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <a class="left carousel-control" href="#carousel" data-slide="prev">
                <i class="fa fa-angle-left"></i>
            </a>
            <a class="right carousel-control" href="#carousel" data-slide="next">
                <i class="fa fa-angle-right "></i>
            </a>
        </div> <!-- /#Carousel --> 
    </section> <!-- /#hero-unit -->

    <?php get_template_part( '/sections/section-feature' ); ?>
    <?php get_template_part( '/sections/section-about' ); ?>
    <?php get_template_part('/sections/section-team') ; ?>
    <?php get_template_part('/sections/section-portfolio') ; ?>
    <?php get_template_part('/sections/section-contact') ; ?>

<?php get_footer(); ?>

themefisher commented 8 years ago

Please download the latest theme from our server http://www.themexpert.com/wordpress-themes/switch . We have already solve this issue.Thanks

dinkyfriend commented 8 years ago

Have you? Because I downloaded it yesterday evening and it was there...

themefisher commented 8 years ago

I Have yo check again.Its vacation in our country . After that I will fix this issue.Thanks

dinkyfriend commented 8 years ago

No worries.