Recent posts on homepage: different thumbnail based on logged in status and post category

If you want to use the the_ functions (e.g. the_permalink() and the_title()) and including in_category() (without specifying the second parameter) outside of The Loop (the standard one which calls the_post()), you should access the global $post variable and call setup_postdata() to set up global post data and after your foreach ends, call wp_reset_postdata() to restore … Read more

Posts modified in the last 48 hours

You can do it easily with WP_Query: $args = array( ‘date_query’ => array( ‘relation’ => ‘OR’, array( ‘column’ => ‘post_date’, ‘after’ => ‘-2 days’ ), array( ‘column’ => ‘post_modified’, ‘after’ => ‘-2 days’ ) ) ); $query = new WP_Query( $args ); More information about date_query parameter of WP_Query. If, for some reason, you still … Read more

How to check if the current page is at a specified path in the URL?

You could try this instead if (!is_front_page() && is_home()) { get_template_part(‘template-parts/blog-categories’); } Explanation for the difference between front_page an home is here: https://wordpress.stackexchange.com/a/239838 if you set a page as a blog-page it is “home”, in your case the landing-page is the so called “front_page”. This is WordPress specific.

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