Skip to content

Instantly share code, notes, and snippets.

View lukaspawlik's full-sized avatar
🎯
Focusing

Lukas Pawlik lukaspawlik

🎯
Focusing
View GitHub Profile
/**
* Timely Network Inc.
* Author: Lukas Pawlik
*
* Put below code into WordPress theme functions.php file.
* You can find this file in wp-content/themes/[your-theme-directory]/functions.php
*
*/
add_filter( 'the_title', '_remove_microformats', PHP_INT_MAX );
function _remove_microformats( $title ) {
@lukaspawlik
lukaspawlik / visual-composer-fix.php
Last active August 29, 2015 14:09
Fix for conflict with Visual Composer
/*
Author: Lukas Pawlik <lukas@time.ly>
Please put this code in your theme functions.php file.
*/
add_filter( 'the_excerpt', '__ai1ec_vcomposer_fix', 0, 1);
function __ai1ec_vcomposer_fix( $content ) {
if ( ! empty( $content ) ) {
return $content;
}
@lukaspawlik
lukaspawlik / change-slug
Last active January 24, 2017 19:40
How to change event detail URI partice /event/ to /ai1ec-event/
/*
Please paste it to your WordPress theme functions.php
DON'T FORGET TO SAVE PERMALINKS SETTINGS.
*/
function __ai1ec_custom_slug_name( $translations, $text, $domain ) {
if (
AI1EC_PLUGIN_NAME !== $domain ||
'event' !== $text
@lukaspawlik
lukaspawlik / ai1ec-properties.txt
Created June 19, 2014 09:31
AI1EC Event properties
Below are properties available to obtain by $event->get()
'post'
'post_id'
'instance_id'
'timezone_name'
'start'
'end'
'start_truncated'
'end_truncated'
@lukaspawlik
lukaspawlik / ai1ec-sample-usage.php
Last active May 15, 2021 05:49
AI1EC usage sample
function ai1ec2_display_events_func( $atts ) {
global $ai1ec_registry;
$content = '<div id="content2"><img src="/wp-content/themes/scio/images/events-header.png" alt="" />';
$time = $ai1ec_registry->get( 'date.system' );
// Get localized time
$timestamp = $time->current_time();
// Set $limit to the specified categories/tags
$limit = array(
//
// this is demo data - please use your own filters