Using Widgets in the main column

  • Anonymous

    #3307

    How can I use widgets inside the main column.

    For example: having a Text Widget on my home page as well as in the sidebar? Is it possible to do it and how would you go about it.

    Thank you

    Mod

    Kenneth John Odle

    #24298

    Yes, this is very possible using a Graphene Action Hook Widget Area. See my tutorial for easy to follow (I think) directions:

    http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog/

    Bobby J

    #24299

    Hey Kenneth,

    That was a great explanation and easy to follow. But I am using a child theme. By the way I use Exec-PHP Plugin – works great for me.

    Here is the tricky part. How do I get to have the widget display on only one specific page.

    For example: If I want to have the widget display only on the “About Us” page and nowhere else?

    Many Thanks

    Mod

    Kenneth John Odle

    #24300

    You can use the Widget Logic plugin to control the appearance of that widget, I believe.

    Action Hook Widget Areas work in a child theme, btw.

    You can use a conditional tag in PHP to control the placement of widgets. For example, instead of

    if (is_front_page ())

    you can use

    if (is_page( 42 ))

    to target just that page with an ID of 42. Likewise, you can use

    if (is_page ( 'About Us' ))

    to target a page titled “About Us”.

    You can read more about it in the codex:

    http://codex.wordpress.org/Conditional_Tags

    Have fun with this, but don’t lose too much sleep playing around with it.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!