WordPress.org

Ready to get started?Download WordPress

Forums

Widgets on Pages
Putting Widget on Homepage under Slider (1 post)

  1. tylerbots
    Member
    Posted 8 months ago #

    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();
    ?>

    http://wordpress.org/plugins/widgets-on-pages/

Reply

You must log in to post.

About this Plugin

About this Topic