Skip to content

Instantly share code, notes, and snippets.

View rianrietveld's full-sized avatar
🌷

Rian Rietveld rianrietveld

🌷
View GitHub Profile
@rianrietveld
rianrietveld / rrwd_save_cpf_with_ctp.php
Created November 22, 2012 07:21
Save an extra custom post field in custom post type in WordPress
<?php
/**
* This code saves an extra custom post field with a custom post type to WordPress
* Rian Rietveld - rrwd.nl
* Add this to the functions.php in your WordPress child theme
*
* Adding the priority 20 for the add_action to save_post is !important, otherwise it won't work
*/
function rrwd_save_cpf_with_ctp ( $post_id, $post ) {
@rianrietveld
rianrietveld / rrwd_custom_post_type_with_taxonomy.php
Created November 22, 2012 06:43
WordPress costom post type with it's own taxonomy. Also adds an archive option to show the posts ordered by taxonomy name
<?php
/**
* This code adds a costom post type with it's own taxonomy to WordPress
* And adds an archive option to show the posts ordered by taxonomy name
* Rian Rietveld - rrwd.nl
* November 22, 2012
* Add this to the functions.php in your WordPress child theme
* Here, as an example, the custom post type is book and the taxonony is genre
*/
@rianrietveld
rianrietveld / wpacc_search_form_header.css
Created November 22, 2012 05:44
WordPress Genesis searchform with label and hook for genesis_header_right
.prefix-hidden {
background-color: #fff;
border: 1px solid #000;
display: block;
font-size: 1em;
left: -1000em;
padding: 0.8em;
position: absolute;
z-index: 10;
}
@rianrietveld
rianrietveld / wpacc_skip_links.css
Created September 25, 2012 09:52
WordPress Genesis Accessible skip links