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

    Hello, i updated to 3.01 Version. Great thanks! So i wanna have a specific sidebar on my custom post type “events”. I created single-event.php file. So what do i need to add there, to display the sidebar “events” i created in the admin?
    thanks

    #333710

    Hey neotemplates!

    Thank you for using Enfold.

    Replace this code:

    //get the sidebar
    				get_sidebar();

    With this:

    //get the sidebar
    				echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_smartphone." ".avia_layout_class( 'sidebar', false )." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">";
        				echo "<div class='inner_sidebar extralight-border'>";
    						dynamic_sidebar('events');
    					echo "</div>";
    				echo "</div>";

    Regards,
    Ismael

    #334785

    ok thanks a lot! the other question is, what code do i have to use, when i dont want to show any sidebar? i want to show full widhth on this custom post type. without sidebar.???

    thanks

    #335245

    Hey!

    Can you post the link to your website please?

    Best regards,
    Yigit

    #335980

    its on a local server at the moment. But i have the single-event.php file – i copied page.php and renamed it into single-event.php and what code do i need to put in to have full width without sidebar?

    thanks

    <main class=’template-page content <?php avia_layout_class( ‘content’ ); ?> units’ <?php avia_markup_helper(array(‘context’ => ‘content’,’post_type’=>’page’));?>>

    <?php
    /* Run the loop to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-page.php and that will be used instead.
    */

    $avia_config[‘size’] = avia_layout_class( ‘main’ , false) == ‘entry_without_sidebar’ ? ” : ‘entry_with_sidebar’;
    get_template_part( ‘includes/loop’, ‘page’ );
    ?>
    <div class=”anmeldung-sitzung”><h3>Anmeldung zur Sitzung</h3><?php
    echo types_render_field(“infos”, array(‘show_name’ => ‘true’,’output’=>’raw’));
    ?></div>

    <!–end content–>
    </main>

    <?php

    //get the sidebar
    $avia_config[‘currently_viewing’] = ‘page’;
    get_sidebar();

    ?>

    </div><!–end container–>

    </div><!– close default .container_wrap element –>

    <?php get_footer(); ?>

    #338268

    any news?

    #342053

    Hi!

    Try removing this part:

    <?php
    
    //get the sidebar
    $avia_config['currently_viewing'] = ‘page’;
    get_sidebar();
    
    ?>

    Regards,
    Josue

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.