Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2331

    Here we go –

    I am trying to set up on Avisio a front page with a sidebar assigned to it through the theme settings. Similar to the way you can set up a static page in Habitat (which I bought, later realizing the limitations of that theme’s slideshow.)

    I set everything up in the backend but the page is not displaying as expected. Any ideas

    http://fidoloves.com

    #37593

    Hey,

    adding sidebar to Avisio homepage isn’t possible without major modifications (someone already tried to add it in this thread: http://www.kriesi.at/support/topic/how-to-add-sidebar-to-homepage)

    #37594

    It took a little hustle but here is what you need to do if you want a sidebar on Avisio. I adapted the code on the other thread and changed a few other files.

    1) Replace your index.php file with this:

    <?php get_header(); ?>
    <div class="wrapper wrapper_shadow ie6fix" id='wrapper_featured_area'>
    <div class='overlay_top ie6fix'></div>
    <div class='overlay_bottom ie6fix'></div>
    <div class="center ie6fix">
    <!-- ###################################################################### -->
    <div class="feature_wrap">
    <!-- ###################################################################### -->
    <?php
    //this class creates the slideshow
    // SET SLIDER OPTIONS
    $slideshow = new kclass_display_slideshow();
    $slideshow->setQueryType('slideshow');
    $slideshow->setQueryNumber($k_option['slideshow']['feature_count']);
    $slideshow->setSlideshowSize('XL');
    $slideshow->setSlideshowClass('aviaslider');
    $slideshow->setCaption('_img_excerpt');
    $slideshow->setWelcome("You can add Slides manually at your backend here or you can use the dummy content installer to create some slides for you so you see how it is done ;)");
    $slideshow->show();
    ?>
    <!-- ###################################################################### -->
    </div><!-- end featuredwrap -->
    <!-- ###################################################################### -->
    <!-- end center-->
    </div>
    <!--end wrapper-->
    </div>
    <div class="wrapper" id='wrapper_featured_stripe'>
    <div class="center">
    <?php

    $slideshow->setSlideshowSize('S');
    $slideshow->showThumbnails();

    if($k_option['mainpage']['buttonText'])
    {
    echo '<a href="'.get_permalink($k_option['mainpage']['buttonLink']).'" class="big_button heading ie6fix">';
    echo '<strong class="ie6fix">'.$k_option['mainpage']['buttonText'].'</strong><span class="buttonBg dynamicBg"></span></a>';
    }

    ?>
    <!-- end center-->
    </div>
    <!--end wrapper-->
    </div>
    <div class="wrapper" id='wrapper_main'>
    <div class="center">
    <div id="main">
    <div class="content">
    <div class='entry'>
    <?php
    #query the pags do display on the starting page
    if($k_option['mainpage']['mainpage_content_final'] != "")
    {
    $id_order = explode(',', $k_option['mainpage']['mainpage_content_final']);
    $args = array(
    'post_type' => 'page',
    'post__in' => $id_order
    );
    $additional_loop = new WP_Query($args);
    #sorts the array so it reflects the order selceted in the backend
    foreach($additional_loop->posts as $the_post)
    {
    foreach($id_order as $key => $value)
    {
    if($value == $the_post->ID)
    {
    $tempArray[$key] = $the_post;
    }
    }
    }
    $additional_loop->posts = $tempArray;
    #output loop
    $counter = 1;
    $firstContainer = 'fpactive_tab_content';
    $firstTab = 'fpactive_tab';
    while ($additional_loop->have_posts()) : $additional_loop->the_post();
    ?>
    <h1 class='fptab <?php echo $firstTab; ?>'><!--"> --><?php the_title(); ?><!----></h1>
    <div class='fptab_content tab<?php echo $counter. " ".$firstContainer; ?>'>
    <?php the_content('Read more'); edit_post_link('Edit', '', '');?>
    </div>
    <?php
    $firstContainer = $firstTab = "";
    $counter ++;
    endwhile;
    }
    else
    {
    echo "<h1>Welcome and Thanks for installing Avisio!</h1>";
    echo "It seems you didnt set up your frontpage by now. You can do that in your wordpress backend at Avisio Options È Mainpage Options";
    }
    ?>
    <!--end enty -->
    </div>
    </div>
    <?php
    $k_option['showSidebar'] = 'home';
    get_sidebar(); ?>

    </div>
    <?php get_footer(); ?>

    #37595

    2) Add the following code to your sidebar.php file around line #24 it will look like the others

    // Home page sidebars
    if ($k_option['showSidebar'] == 'home' && dynamic_sidebar('Sidebar Home') ) : $default_sidebar = false; endif;

    #37596

    3) Add the following code to widgets.php, I put mine around line #20

    register_sidebar(array(
    'name' => 'Sidebar Home',
    'before_widget' => '<div id="%1$s" class="box_small box widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
    ));

    That is it you will now have a widget area called home that displays as your sidebar. The only cavet is if there are any widgets in the “Displays Everywhere” widget area they will display there as well. I have not looked this

    Have Fun, I hope this helps out the next person.

    #37597

    Thanks for posting this. It will help some Avisio users.

    #37598

    Hi I have a problem i follow all the step but i can see the buttons on the main page i just saw the name of the pages on text and the link is gone, can you give me a hand to fix this, thanks

    http://www.phrnetwork.com

    Ps: the word radio is a page

    Yhanks

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Front Page – with sidebar’ is closed to new replies.