WordPress.org

Ready to get started?Download WordPress

Forums

Widgets on Pages
[resolved] Widget on home page (8 posts)

  1. fredMCCR
    Member
    Posted 1 year ago #

    Hi,
    Very nice plugin !

    However, I would like to place a widget at the bottom of the main area of the home page (which is displaying my recent posts).
    "Home page" is not a real page. So I cannot add the shortcode by editing the home page in the editor.
    Any solution ?

    Thank you ;)

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

  2. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. fredMCCR
    Member
    Posted 1 year ago #

    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 ?

  4. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

    That's great news, nice one!

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

  5. contactdarlingstreet@gmail.com
    Member
    Posted 1 year ago #

    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

  6. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

    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

  7. Newfound
    Member
    Posted 1 year ago #

    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!

  8. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.