New answers tagged

0

Here is what you are looking for: <?php class mm_location_widget extends WP_Widget { function __construct() { parent::__construct( // Base ID of your widget 'mm_location_widget', // Widget name will appear in UI __('Locations By Marvil Media Widget', 'mm_location_widget_domain'), // Widget ...


2

Without actually knowing what you're trying to achieve I see the following problems: $post variable is not defined in your widget() method. Try setting it using $post = get_post( get_the_ID() ) for instance. By the time you call foreach ($posts as $post) { ... } $posts variable is also not set. You need some query for this one I guess - WP_Query() or ...



Top 50 recent answers are included