Skip to content

Instantly share code, notes, and snippets.

@farrukhmomin
farrukhmomin / CSSMediaQueries
Created June 3, 2015 19:55
Media Queries for different screen sizes
@media screen and (max-width: 1160px) {}
@media screen and (max-width: 1024px) {}
@media screen and (max-width: 767px) {}
@media screen and (max-width: 640px) {}
@media screen and (max-width: 480px) {}
@media screen and (max-width: 360px) {}
@farrukhmomin
farrukhmomin / HTMLSelect
Created June 3, 2015 19:41
HTML Select Styling
.combo {
background: #efefef url(../images/combo-arrow.png) no-repeat right 8px center;
border: solid 1px #ccc;
border-radius: 6px;
color: #333;
padding: 6px 4px;
overflow:hidden;
display:inline-block;
}
@farrukhmomin
farrukhmomin / WP-Query
Last active May 8, 2020 07:17
SQL Query to get Latest Wordpress Post with Featured Image.
select DISTINCT wp_posts.id, wp_posts.post_title, wp_posts.post_content, wp_posts.post_type, featured_image.guid as post_image, wp_posts.post_modified, wp_users.display_name
from wp_posts
inner join wp_postmeta on wp_posts.id = wp_postmeta.post_id and wp_postmeta.meta_key = '_thumbnail_id'
inner join wp_posts as featured_image on featured_image.id = wp_postmeta.meta_value
inner join wp_users on wp_users.id = wp_posts.post_author
where wp_posts.post_status = 'publish'
order by wp_posts.ID desc
limit 10