WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Widgets on Pages] Widget on home page

[Resolved] [Plugin: Widgets on Pages] Widget on home page

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author toddhalfpenny
    Participant

    @toddhalfpenny

    Hey fredMCCR,

    Yes this can be done if you’re happy editing some php.

    You can use the Widgets on Pages template tags to call the widget area. What you’ll need to do is add something like this underneath the post loop on your index.php

    <?php widgets_on_template("wop_1"); ?>

    fredMCCR
    Member

    @fredmccr

    Thank you for the code !
    In my “DelicateNews” theme from Elegant Themes, I added it to home.php. Works great !!
    Any idea how to inherit the colors, fonts, … from the main style.css ?

    Plugin Author toddhalfpenny
    Participant

    @toddhalfpenny

    That’s great news, nice one!

    If you can post a link I can give you a pointer for sure.

    contactdarlingstreet@gmail.com
    Member

    @contactdarlingstreetgmailcom

    Hey Todd – love widgets_on_pages!
    I used the code you’ve provided above to add a slider to my homepage – just before our blog content grid, however it pushes the content down in the right hand sidebar below the widget. Any idea how to keep this from happening?
    Please see http://www.darlingstreet.com.au for reference.
    Thanks!
    Matt

    Plugin Author toddhalfpenny
    Participant

    @toddhalfpenny

    Hey Matt,

    Are you saying you’d like the slider to only be as wide as the main content so that the sidebar starts alongside it?

    Todd

    Newfound
    Member

    @precipitatejournal

    Having some trouble understanding exactly how to implement this and hoping you can help.

    Right now, I’ve dropped the line of PHP code into my index.php file (below), then I’ve added widgets to the “Widgets on Pages 1” area, yet they are still not showing. What am I doing wrong here?

    <?php
    /**
     * @package WordPress
     * @subpackage Sheeva
     * @since 1.0
     */
    
    get_header() ?>                             
    
    <div id="primary" class="layout-<?php echo yiw_layout_page() ?>">
        <div class="inner group">
            <!-- START CONTENT -->
            <div id="content" class="group">
                <?php get_template_part('loop', 'index') ?>
            <?php widgets_on_template("wop_1"); ?>
    </div>
            <!-- END CONTENT -->
    
            <!-- START SIDEBAR -->
            <?php get_sidebar( 'blog' ) ?>
            <!-- END SIDEBAR -->
        </div>
    </div>
    
    <?php get_footer() ?>

    Thanks!

    Plugin Author toddhalfpenny
    Participant

    @toddhalfpenny

    Hey NewfoundOrg,

    Could you start a new thread for this please?

    If you could post a link to your site that would also be helpful.

    Ta,
    Todd

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: Widgets on Pages] Widget on home page’ is closed to new replies.