Skip to content

Instantly share code, notes, and snippets.

sitemap.xml for Kirby CMS

Notes:

  • Remember to exclude the sitemap from caching, search and the sitemap itself!
    • and exclude only the pages you don`t wnt wto exclude
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to display only the Title and Featured Image for Posts in Genesis.
<?php
//* Do NOT include the opening php tag
/**
* Featured Image linking to Post's single page.
*/
function sk_do_post_image() {
$image_args = array(
'size' => 'full',
'attr' => array(
@About2git
About2git / single.php
Created February 12, 2015 16:25 — forked from srikat/single.php
How to add a 'New' ribbon for Posts published in the last 7 days in Genesis.
@media only screen and (max-width: 800px) {
body {
background: #f5f5f5;;
}
.entry {
padding: 50px 60px;
}
.comment-respond,
@About2git
About2git / plugin.php
Last active August 29, 2015 14:15 — forked from srikat/plugin.php
Custom widget that displays value of a custom field in WordPress
// Widgets
include_once( BE_DIR . '/lib/widgets/widget-related-services.php' );
@About2git
About2git / plugin.php
Last active August 29, 2015 14:15 — forked from srikat/plugin.php
Custom WordPress widget showing CPT entries from the same category/categories.
// Widgets
include_once( BE_DIR . '/lib/widgets/widget-related-case-studies.php' );
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to add a link to author's Twitter page in post info in Genesis
//* Enqueue Dashicons
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' );
function enqueue_dashicons() {
wp_enqueue_style( 'dashicons' );
}
//* Add Twitter field in User Profile page in WP admin
function my_new_contactmethods( $contactmethods ) {
$contactmethods['twitter'] = 'Twitter (w/o the @)';
@About2git
About2git / functions.php
Created February 13, 2015 21:18 — forked from srikat/functions.php
Displaying Posts output by Display Posts Shortcode in Masonry.
//* Enqueue Google Fonts and JS script
add_action( 'wp_enqueue_scripts', 'magazine_enqueue_scripts' );
function magazine_enqueue_scripts() {
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400,700|Raleway:400,500,700,900', array(), CHILD_THEME_VERSION );
// wp_enqueue_script( 'magazine-entry-date', get_bloginfo( 'stylesheet_directory' ) . '/js/entry-date.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'magazine-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true );
//* Enqueue Masonry
@About2git
About2git / functions.php
Created February 13, 2015 21:19 — forked from srikat/functions.php
Testimonials Carousel in WordPress using Testimonials by WooThemes, Display Posts Shortcode and Slick jQuery
//* Enqueue scripts and styles
add_action( 'wp_enqueue_scripts', 'enqueue_custom_scripts_styles' );
function enqueue_custom_scripts_styles() {
wp_enqueue_style( 'dashicons' );
wp_enqueue_style( 'slick-styles', get_stylesheet_directory_uri() . '/css/slick.css' );
wp_enqueue_style( 'slick-theme-styles', get_stylesheet_directory_uri() . '/css/slick-theme.css' );
wp_enqueue_script( 'slick-js', get_stylesheet_directory_uri() . '/js/slick.min.js', array( 'jquery' ), '1.3.15', true );
@About2git
About2git / functions.php
Last active April 16, 2019 17:44 — forked from srikat/functions.php
How to set up animated Search form in Genesis
//* Enqueue scripts and styles
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts_styles' );
function custom_enqueue_scripts_styles() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' );
wp_enqueue_script( 'global', get_bloginfo( 'stylesheet_directory' ) . '/js/global.js', array( 'jquery' ), '1.0.0', true );
}
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to display Posts in 5 columns when using Genesis Sandbox Featured Content Widget Plugin.
//* Custom image size for Featured images in the Below Header widget area
add_image_size( 'below-header', 216, 120, true );
//* Register below header widget area
genesis_register_sidebar( array(
'id' => 'below-header',
'name' => __( 'Below Header', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the header', 'themename' ),
));