Skip to content

Instantly share code, notes, and snippets.

View fredbradley's full-sized avatar

Fred Bradley fredbradley

View GitHub Profile
<?
/**
* Some custom code written by Fred that will pull in all the photos in given photosets
*/
// First we Add some custom styles! Not ideal, and not compliant but quick and easy! ?>
<style>
ul.flickr-photos,
ul.flickr-photos li {
list-style:none;
@fredbradley
fredbradley / Display Latest Tweet
Last active August 29, 2015 13:56
Copy this script and put it right at the bottom of your index.html file. Ensure that somewhere in your template there is a div that looks like this: <div id="emapTweet"></div>
p.interact a {
background:url("twitter-sprite.png"); /* Obviously make sure that twitter-sprite.png is included in your template! */
display: inline-block;
height: 20px;
width: 20px;
text-indent: -9999px;
}
p.interact a.twitter_reply_icon,
p.interact a.twitter_retweet_icon,
p.interact a.twitter_fav_icon {
<html>
<head>
<style>
/**
* Update: July 2020
* I have converted this into it's own separate project now: https://github.com/fredbradley/tfl-colours
*/
</head>
<body>
<!-- Here is an example of how the above styles can be implmented!
@fredbradley
fredbradley / SRAMail
Created November 22, 2013 21:27
Proposed New SRA Mailing Design
<div class="no-format" id="header">
<div class="text-center">
<p>BLAH BLAH BLAH</p>
</div>
</div>
<div class="container" id="emailWrapper">
<div class="row" id="header">
<div class="col-md-5">
SRA LOGO
</div>
@fredbradley
fredbradley / Need some help with Wordpress Custom Tax Query and Group Taxomonies
Created October 6, 2013 14:09
I need to create a page that shows all the posts that are tagged with "video". It's not working like I expect. It's only showing the normal blog posts - not the other custom post types that are also tagged with 'video'. Below is the code that I've got. For reference the function get_bonn_post_types is an array of all the post types on my install…
<?php
/*
Hello!
This has been bugging me for the best part of a day now, so I'm appealing to help in order to calm my nerves.
I run a site that has many custom post types. Every post type shares the use of the post_tag taxonomy.
I need to create a page that shows all the posts that are tagged with "video". It's not working like I expect. It's only showing the normal blog posts - not the other custom post types that are also tagged with 'video'.
@fredbradley
fredbradley / nextPlayFunction.php
Created April 11, 2013 17:31
Can anyone spot any errors with the code below? I need it to display an output that matches with this document from the client (see screenshot here: https://twitter.com/fredbradley/status/322399388146216961/photo/1 )
<?php
/*
* FOR THE PHP GEEKS!
------------------
Can anyone spot any errors with the code below?
I need it to display an output that matches with this document from the client (see screenshot here: https://twitter.com/fredbradley/status/322399388146216961/photo/1 )
if ($_POST['email']) {
$email = $_POST['email'];
$message = "Hello this is a test! It worked!";
mail($email, 'My Subject', $message);
echo 'Mail Should Now Be Sent!';
}