WordPress- Set Featured Image Link MissingI have no idea why, but now and then the “set featured image” link is missing from the “add new post” page. I’ve also noticed that a lot of other… |
PHP- Get URLs/Links From A StringThe following function puts all URLs/links from a string into an array. The function uses the preg_match function, and looks for URLs/links with http/https. Please note, the function does NOT… |
WordPress- Custom Excerpt LengthHere’s a bit of code that allows you to to create a custom excerpt length, based on the amount of characters you want to display. Code Add the following code… |
PHP- Display Certain Amount Of Words From String/VariableIf you want to display a specific amount of characters from a string, you can use the PHP built-in function substr, but from what I’m aware, there isn’t a PHP… |
PHP- Show Your Latest Tweet On Your Website With PHPIn the archives, there’s a post that shows you how to show your latest tweet on your website using jQuery. While that method was OK, I found it rather temperamental…. |
PHP- How To Show An Excerpt/Teaser From A StringHere’s a quick function that will limit the amount of words that will display from a string of words, so you effectively get a excerpt/teaser. For example, let’s assume you… |
jQuery – Start jQuery After Page Has Fully LoadedIf you want your jQuery to start executing after the page is fully loaded, you can use the following code: 1 2 3 4 5 <script type="text/javascript"> $(window).load(function() { //… |
Using jQuery Lightbox With live()I’ve noticed a few people struggling with the following issue in a few forums, so I thought i’d write a blog post on how to overcome it. I looked through… |
jQuery – Uploadify Returning HTTP 401 Error On Mac OSNot sure how useful this is going to be for anyone else, but I was on the verge of throwing my computer out the window earlier today while trying to… |
jQuery- Show On Click, Hide On Hover Out FunctionNot sure how many people would be looking for a function like this, but I needed it, so I suspect someone else out there might too. The code below is… |
jQuery – Second Click Function ExamplesHere are a few ways in which you can use the “click” event to trigger an action on the first click, and then trigger another action on the second click…. |
MySQL – SELECT Rows Where First Character Is Not A LetterHere are two methods of SELECTING rows where the first character is not a letter. For example, if you have the following data: So let’s say you want to select… |
Javascript – Passing Variables Into window.locationI’m quickly going to show you how to pass a variable into window.location – I’ve recently read a few discussion forums where people have been struggling with this. It’s really… |
PHP- Alternative To The Depreciated mime_content_type Function And Fileinfo FunctionsYou’ve probably landed on this page because you want to find the Content-type of a file by using the mime_content_type function. But when you tried using the function, you were… |
How To Display Latest Tweet On WebsiteHere’s a really quick and simple way to display your latest Tweet on your website like the example below (the graphics obviously won’t appear, just the Tweet): 1 2 3… |
Javascript – Get The Hash Tag Value From A URLSo, you have the following URL: http://www.example.com/page/#comment-12 You want to get the value after the hash tag (#), which is comment-12 The following Javascript code will help you achieve what… |
htaccess- 301 Redirect Old URLs With SpacesHere’s a quick and easy htaccess 301 redirect tip. So, you have a URL like this: http://www.example.co.uk/this is_a_file.html and you want to redirect it to: http://www.example.co.uk/this_is_a_file.html All you need to… |
jQuery- Show The Height And Width Of The Browser Viewport in Real-TimeStrange. I looked around everywhere for this code, and couldn’t find it anymore online. I simply wanted jQuery code that would show the height and width of the browser viewport… |
PHP- List All Directories/Folders From A Specified LocationThis is a quick extension/counterpart to my existing blog post that explains how to List All Files In A Directory in PHP. But instead of listing all files, I’m quickly… |
htaccess- Hide File ExtensionI only used this code for the first time last week, but seems to work pretty well. The same code is plastered all over the internet on various websites, so… |
MySQL / PHP – Optimize MySQL Tables ScriptThe MySQL Optimize Table command will effectively de-fragment a mysql table; it’s useful for tables which are frequently updated and/or rows are deleted. Optimizing will will help with overall performance…. |
WordPress Excerpt Function Showing CSS #gallery-1I had the strangest problem earlier. A client had reported that CSS code was showing on a category page, where only excerpts of a post should be showing. This is… |
Javascript – Make Div Into A Clickable LinkFrom what I’m aware, you can’t make a div into a clickable link with just HTML. The only way I’ve ever known is by using Javascript. Open in new window… |
Simple JQuery / PHP Image GalleryI previously wrote a Simple, Pure CSS Image Gallery. But times have changed since then, and now everyone seems to be keen on AJAX technologies. So I’ve written a nice… |
PHP – Changing Date FormatA friend of mine has been struggling to format a date string he’s pulling out from a MySQL table. He’s just started learning PHP, so he’s still getting to grips… |
JQuery – Hover And Show Next ElementSo, this JQuery code shows the next element (a DIV in this case) when you hover over a “trigger” (in this case, the triggers are hyperlinks), and then hides the… |
CSS- Using Float With List Item Bullets in I.E 6/7Note to self and everyone else having a breakdown over this issue, YOU CANNOT float a list in I.E 6 or 7 and have the bullets display. It took me… |
Ajax- JQuery Hovering/Expanding Info BoxI looked high and low for an “AJAX hovering/expanding info box”, but I couldn’t really find anything decent that worked in all browsers. Most of them choked when using I.E…. |
WordPress – Removing Unwanted Header ElementsBy default, WordPress tends to load a lot of junk in the header. So, for example, if you “view source” when looking at a wordpress blog post, you’ll typically see… |
PHP – Creating A Year (date) LoopHere’s a good/efficient way of building a loop of years from a starting point to an ending point. For example, this code will show you how to print a range… |
Learning & sharing
This is where we store some of our Web Development thoughts, tips and tricks for both our own uses and for others to learn from. Sharing is caring.
Please feel free to contrinute to our blog posts; perhaps even teach us a few tricks of your own. We'd love to hear your thoughts.
HTML/XHTML |
PHP |
JavasScript |
jQuery / AJAX |
CSS |
XML |
MySQL / Databases |
Adobe Photoshop |
Adobe After Effects |
Adobe Premiere |
Expertise
BrightCherry collectively have a broad range of web and graphic design skills, some of which we specialise in more than others. You will find a list of those specialised talents on the left.