The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Request: get_the_widget() function (1 post)

  1. digitalnature
    Posted 6 years ago #


    Currently, in wp 2.8 you can output a arbitrary widget anywhere in the theme with "the_widget()" function.

    The problem is that the output cannot be stored in a variable, so the theme author cannot allow the user to place this widget anywhere inside a post for example (eg. using shortcodes)
    Something just like "get_the_content" is to "the_content"..

    I'm using PHP buffer output to achieve this (ob_get_contents), but I don't know if this the best way to do it.

    Is there any chance you can add a function that does this in 3.0?


Topic Closed

This topic has been closed to new replies.

About this Topic