Viewing 11 to 20 of 27 items
Archive | Uncategorized RSS feed for this section

Add responsive Google Maps oEmbeds to WordPress

This is a solution I have researched and created based on a few pre-existing components. Firstly, use this to add Google Maps oEmbeds to WordPress: https://github.com/wpsmith/google-oembed I made one change to the code, I changed the following line by added a class to the Google Maps iframe, you will see why later. Change this line: …to  Full Article…

0

Batch delete WordPress comments with phpMyAdmin

All you need to know is that unapproved comments are marked with 0 and approved comments are marked with 1. Back up your db and then running the following query making sure you have the right table prefix for your db. DELETE from wp_comments WHERE comment_approved = ‘0’; or DELETE from wp_comments WHERE comment_approved =  Full Article…

0

How to break the foreach Loop in PHP

Basically we are going to use the following algorithm: First we set a variable $count to 0 [Integer Type] Now on each loop of the foreach we increase the value of $count by 1. Just after the increment, inside the foreach loop we check if the value of $count is equal to the desired value of looping. If the value is equal then we just  Full Article…

0

Get post slug function

Taken from: http://www.tcbarrett.com/2011/09/wordpress-the_slug-get-post-slug-function/ Using basename() and get_permalink() to retrieve post slug Using global $post object to retrieve post slug   Fully hookable function to retrieve the post slug This provides you with a simple way retrieve and display the post slug. I find this useful for applying unique CSS ids and classes to my HTML mark  Full Article…

0

CSS Generated Content And Counters

This amazing content is taken from here: Smashing Magazine What Is Generated Content? In technical terms, generated content is a simple abstraction created by CSS in the document tree. As such, in practical terms, generated content exists only in the layout of the Web document. Accessing generated content via JavaScript is possible by reading the  Full Article…

0

Easily Add Custom Classes to Your First and Last Menu Items in WordPress

https://gist.github.com/thomasgriffin/4253190 Below is the code to do this programatically, it is worth noting that you can add classes via the menus page in the wp-admin by selecting Screen Options and then CSS Classes. The below code may be better for instances where you don’t want to depend on users to remember to add the classes manually.

0

How to subscribe to a feed in Feedly if it can’t find it

As a workaround you can put the following Feedly url infront of the complete feed url you wish to subscribe to. http://www.feedly.com/home#subscription/feed/ You would get something like this: http://www.feedly.com/home#subscription/feed/http://rss1.smashingmagazine.com/feed/

0