Intermediate

21
Mar

custom hooks

This example uses a custom hook to place a string in the sidebar of a category archive page. The below would ideally live in the functions.php file

25
Sep

modernizr html classes

Modernizr generates these classes in ie8 no-flexbox no-canvas no-canvastext no-webgl no-touch no-geolocation postmessage no-websqldatabase no-indexeddb hashchange no-history draganddrop no-websockets no-rgba no-hsla no-multiplebgs no-backgroundsize no-borderimage no-borderradius no-boxshadow no-textshadow no-opacity no-cssanimations no-csscolumns no-cssgradients no-cssreflections no-csstransforms no-csstransforms3d no-csstransitions fontface generatedcontent no-video no-audio localstorage sessionstorage no-webworkers no-applicationcache no-svg no-inlinesvg no-smil no-svgclippaths

1
Jun

wordpress php template files

Here’s some notes I’ve gathered from working with wordpress templates. archive.php, category.php, taxonomy.php etc You need to use the normal wordpress loop in order to get wordpress to use its magic and bring out the native functionality of these template ie: “archive.php”.

If you use a custom Query in your “archive” template, like the one below. you will override

Read more

26
Apr

conditional statements

If is not any of these Here we check that the page is not one of the “masterplan pages” or any of the singular pages from our custom post type ‘property’. Note the bracket positions are slightly weirder then you may expect.

If is post id In this case we have used it for Woocommerce product (custom post type)

Read more

17
Dec

apply css class to ipad with jquery

When working with responsive web design and development. You will ocassionally need to apply some styles just for ipad. This code lives in an external js file. It adds a class of “js” onto the body html element only on ipad devices.

6
Jun

jQuery NoConflict

The use of the $ instead of writing out jQuery in your jQuery code causes conflicts and conflicts means something is going to break. Do a google search and everyone tells you “hey bro don’t sweat it, just use:”

I have no success getting this to work. But what does work is the following All your custom jQuery code needs

Read more

11
Jun

wordpress returns blank

Blank pages always means a php error. So wordpress is now displaying just a blank page. Check your functions.php file for empty lines under and before all the code. Deleting these empty lines should solve the issue. When i say empty lines I mean spaces following the actual code. These spaces have no code in them therefore should be deleted.

Read more