How to display first post thumbnail as a background image of a widget?

Few notes: Just use the_title(); instead of echo get_the_title(); Use the_title_attribute() for title attributes. No need to override the global $wp_query when you use a secondary query. Then use wp_reset_postdata() after your secondary query loop. Use the_permalink() that escapes the permalink, instead of the unescaped echo get_permalink(); There’s the has_post_thumbnail() to check if the post … Read more

Adding Widgets to Draft Pages

As you note in your comment there are plugins that allow you to insert different widgets on different types of pages. If the plugin doesn’t include the possibility you need, you’ll have to build it yourself. First, you’ll have to familiarize yourself with how to add widget areas (sidebars) to your (child) theme. It isn’t … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)