Skip to content

Instantly share code, notes, and snippets.

@skyshab
skyshab / default-template.php
Created August 23, 2016 15:42
Custom code I used to integrate The Event Calendar with Divi
<?php
/**
* Custom Events Template
* This file is the basic wrapper template for all the views if 'Default Events Template'
* is selected in Events -> Settings -> Template -> Events Template.
*
* Override this template in your own theme by placing this file at [your-theme]/tribe-events/default-template.php
*
* @package TribeEventsCalendar
*
@joshuadavidnelson
joshuadavidnelson / example-output.html
Last active January 22, 2024 12:42
Using WordPress responsive images for css background-image property, in-line styling
<style>
.header {
background-image: url(http://local.dev/wp-content/uploads/2016/04/image-300x151.png)
}
@media only screen and (min-width: 300px) {.header {
background-image: url(http://local.dev/wp-content/uploads/2016/04/image-768x386.png)
}}
@media only screen and (min-width: 768px) {.header {
background-image: url(http://local.dev/wp-content/uploads/2016/04/image-1024x515.png)
}}
@raaar
raaar / WORDPRESS: change Posts label in admin area
Last active April 7, 2022 13:31
WORDPRESS: change Posts label in admin area
function change_post_label() {
global $menu;
global $submenu;
$menu[5][0] = 'News';
$submenu['edit.php'][5][0] = 'News';
$submenu['edit.php'][10][0] = 'Add News';
$submenu['edit.php'][16][0] = 'News Tags';
echo '';
}
function change_post_object() {