Author: Nicholas Rowe
-
Element height based on viewport height
Today I had to create a little landing page for one of our clients. one of the requirements was to have the landing page fill the screen no matter what height the viewport was. So this would fill the space up on a desktop, iPad for example. I stumbled across a handy piece of jQquery…
-
Find out what template a WordPress theme is using.
Recently I was working on a clients website and it was decided that I was going to integrate buddypress on the website. I have worked with buddypress in the past and found it a great bit of software to extend upon with WordPress. This time round it was a bit more of a overall custom feel…
-
Happy day for web designers
As of recently, Internet explorer is no longer the #1 internet browser in the UK. Research shows that google chrome has now slightly surpassed Microsofts dominating commercial browser. Web designers rejoice!
-
Change the default excerpt length of 55 words.
By default the_excerpt length is 55 words. Sometimes I want to give my readers a longer excerpt length, depending on font-size and other element sizes, you could make the little teaser somewhat longer. The below code creates overwrite the_excerpt and will return as many words as you desire. [php]function new_excerpt_length($length) { return 100; } add_filter(‘excerpt_length’, ‘new_excerpt_length’);[/php] Change…
-
When to use WP_Query, query_posts and pre_get_posts
query_posts() function is commonly thought of as the simplistic and problematic way forward to modify a main query of a page by replacing it with a new instance of the particular query. It is bad practice as it re runs SQL queries and will simply not work and fail in some circumstances, this usually happens when…