https://millionclues.com/wordpress-tips/adding-safari-only-css/
https://millionclues.com/wordpress-tips/adding-safari-only-css/

https://millionclues.com/wordpress-tips/adding-safari-only-css/

Have you ever wanted to get template file being used on a current page? Well, I did, on a project I was working for a client. I wanted to get page template name to filter the post query based on the page template file being used. Although I could have done this by creating few…

Prior to WordPress 3.6, we had to run a query to retrieve all media attachments to a specific post. We had to do something like this. // show all WordPress post attachments $args = array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1, ‘post_status’ => ‘any’, ‘post_parent’ => $post->ID ); $attachments = get_posts( $args ); if (…

Often when designing a WordPress theme, designers choose to have different styling for odd/even comments. But recently while working on a project, I required to style odd and even blog posts differently. To do this, I needed to add odd and even class to WordPress posts. While searching for a solution, I found many tutorials…

When developing a WordPress theme or plugin, it may be very useful to be able to output all WP Query variables. Here is a simple code snippet to do it easily. Paste the code below on any files, where you’d like to display the WP Query variables. <?php // display all wp query variables global…

By OutsourcedContent — on November 10, 2017 To retrieve the post title of a post as saved in the wp_posts table in the WordPress database use this <?php echo get_post_field( ‘post_title’, $post_id, ‘raw’ ); ?> If you use get_the_title() function, WordPress applies the ‘the_title‘ filter before returning the value.

You might have noticed on many websites that they highlight their author’s comment by making it a different background color and style. Highlighting post author comments is useful, if you receive a large number of comments on your website and you want your visitors to easily identify post author’s responses in the comment list. This…
