Skip to content

Instantly share code, notes, and snippets.

View lipaonline's full-sized avatar

Patrick Faust lipaonline

  • Sočaplikacija d.o.o.
  • Slovenia
View GitHub Profile
@lipaonline
lipaonline / gist:fbae74a3bc9f1dec1afa74caded664b6
Last active August 8, 2016 09:06
ACF + Google Map (hack from ACF documentation)
<style type="text/css">
.acf-map {
width: 100%;
height: 400px;
border: #ccc solid 1px;
margin: 20px 0;
}
/* fixes potential theme css conflict */
add_filter('the_author', function($nom) { return 'moi';});
add_filter( 'author_link', 'change_author_link', 10, 3);
function change_author_link($link, $author_id, $author_nicename) {
$link = '#';
return $link;
}
function new_excerpt_more($more)
{
@lipaonline
lipaonline / gist:10964132
Last active August 29, 2015 13:59
snippet to add CPT in WordPress loop 1
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
$query->set( 'post_type', array( 'post', 'livre' ) ); // livre is our Custom Post Type
return $query;
}