Sexta-feira, 22 de novembro de 2024, E-mail: [email protected]
,

‘A slider plugin that displays three posts, one next to the other (three columns), purple background, white letter, which takes the posts from the vitrine category.’,
)
);
}

public function widget($args, $instance) {
$posts = get_posts(array(
‘category’ => ‘geral’,
‘numberposts’ => 3,
));

$output = ”;
foreach ($posts as $post) {
$output .= ‘

‘ . $post->post_title . ‘

‘ . $post->post_excerpt . ‘

‘;
}

echo $output;
}

public function update($new_instance, $old_instance) {
$instance = $old_instance;

return $instance;
}

public function form($instance) {
// No settings to edit
}

}

function register_slider_plugin() {
register_widget(‘SliderPlugin’);
}

add_action(‘widgets_init’, ‘register_slider_plugin’);

Últimas notícias:

Veja mais notícias aqui