Skip to content

Instantly share code, notes, and snippets.

<?php echo get_stylesheet_directory_uri(); ?>/assets/img/favicon.ico"
//http://jsfiddle.net/RokoCB/tw6g2oeu/7/
(function($, win) {
$.fn.inViewport = function(cb) {
return this.each(function(i,el){
function visPx(){
var H = $(this).height(),
r = el.getBoundingClientRect(), t=r.top, b=r.bottom;
return cb.call(el, Math.max(0, t>0? H-t : (b<H?b:H)));
} visPx();
// get page ID with objct post
$custompageid = get_field('anfrageseite_id', 'option'); // 'options' is standard value!!!
// Register Sidebar
function alle_sprachen_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Header-Hero', 'alle_sprachen' ),
'id' => 'header_hero',
'description' => esc_html__( 'Add widgets here.', 'alle_sprachen' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
// register sidebar in functions
function alle_sprachen_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'alle_sprachen' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'alle_sprachen' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
@ABooooo
ABooooo / addingwidgets
Created January 9, 2019 14:50
Dynamically Adding Four Footer Widget Areas
https://code.tutsplus.com/tutorials/dynamically-adding-four-footer-widget-areas--cms-22168
<?php echo get_template_directory_uri(); ?>
https://gist.github.com/Metaviolet/682c8d3b05a3a01fd598
//First declare breakpoints
$breakpoints: (
'small': 767px,
'medium': 992px,
'large': 1200px
) !default;
/// Mixin to manage responsive breakpoints
1. https://docs.acquia.com/lightning/install/local/
2. https://gist.github.com/criscom/d973ea5e4328bf8aab39857ecf93b075
#Install lightning
composer create-project acquia/lightning-project MY_PROJECT --no-interaction
open with browser MY_PROJECT/docroot
install Drupal
#error execution time
https://www.drupal.org/forum/support/installing-drupal/2014-01-22/maximum-execution-time-of-30-seconds-exceeded-in-drupal
In Extension Manager (EM) find the RealURL and set option Automatic configuration file format to PHP source (slow!) (with automatic conf still enabled!)
Remove the file typo3conf/realurl_autoconf.php (as far as I remember), clear all caches and refresh the main page, the autoconf file will be recreated in unserialized version.
Rename the file to typo3conf/realurl_conf.php, go to EM again and uncheck the automatic configuration option.
After clearing the caches and you'll be switched to manual config built from the automatic one.