• Can anyone help me to add a widget to my homepage below the slider. I am using xin magazine theme and need to put posts under my slider. I just can’t figure out where I need to put the code. Below I have included a copy of my home.php code. Any advise on where the code needs to go would be very helpful. Also, can’t seem to figure out if I need to use this code, [widgets_on_pages id=”Front Post”] or this code, <?php widgets_on_template(“FrontPost”); ?> . Thanks again for any replies.

    <?php
    /**
    * Default Home Page
    *
    * @package xinmag
    * @since 1.0
    */
    global $xinmag_options;
    get_header();

    if ( ‘page’ == get_option( ‘show_on_front’ ) || 2 == $xinmag_options[‘homepage’] ) {
    ?>
    <div id=”content” class=”<?php echo xinwp_content_class(); ?>” role=”main”>
    <?php
    if ( have_posts() ) {
    xinmag_content_nav( ‘nav-above’ );
    while ( have_posts() ) {
    the_post();
    get_template_part( ‘content’, get_post_format() );
    }
    xinmag_content_nav( ‘nav-below’ );
    } elseif ( current_user_can( ‘edit_posts’ ) ) {
    get_template_part( ‘content-none’, ‘index’ );
    } ?>
    </div>
    <?php
    get_sidebar();
    } elseif ( 1 == $xinmag_options[‘homepage’] ) {
    get_template_part( ‘pages/magazine’ );
    }
    get_footer();
    ?>

    https://www.ads-software.com/plugins/widgets-on-pages/

  • The topic ‘Putting Widget on Homepage under Slider’ is closed to new replies.