Skip to content

Instantly share code, notes, and snippets.

@seothemes
Created February 8, 2017 10:48
Show Gist options
  • Save seothemes/3b6ead2df2263a7f6c8497a4d7e39de9 to your computer and use it in GitHub Desktop.
Save seothemes/3b6ead2df2263a7f6c8497a4d7e39de9 to your computer and use it in GitHub Desktop.
<?php
/**
* This file adds the starter content to the Genesis Starter theme.
*
* @package Genesis Starter
* @link https://make.wordpress.org/core/2016/11/30/starter-content-for-themes-in-4-7/
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
add_action('after_setup_theme', function () {
add_theme_support( 'starter-content', array(
'widgets' => array(
'front-page-1' => array(
'text_custom' => array( 'text', array(
'title' => '',
'column-classes' => 'two-thirds first',
'text' => '<h1>Welcome to the Genesis Starter theme</h1><p>The perfect starting point for creating awesome Genesis Child themes. Designed to meet the needs of developers creating client sites or building WordPress themes to sell. It comes with some cool features such as Gulp, Sass, flexible widget columns, customizer options, starter content and more.</p><a href="#" class="button">Get Started</a>',
) ),
),
'front-page-2' => array(
'text_one' => array( 'text', array(
'title' => '',
'column-classes' => 'one-third first',
'text' => '<h4><span class="dashicons dashicons-media-text"></span> Starter Content</h4><p>Themes can now use the Starter Content feature that enables users to setup demo content in one click. Genesis Starter comes with everything you see here.</p>',
) ),
'text_two' => array( 'text', array(
'title' => '',
'column-classes' => 'one-third',
'text' => '<h4><span class="dashicons dashicons-editor-spellcheck"></span> Google Fonts</h4><p>It\'s now easier than ever to use Google Fonts and Icon Fonts in your theme, just select the fonts from a dropdown menu in the theme customizer.</p>',
) ),
'text_three' => array( 'text', array(
'title' => '',
'column-classes' => 'one-third',
'text' => '<h4><span class="dashicons dashicons-smartphone"></span> Mobile First Sass</h4><p>Mobile-first Sass that is neat and tidy, organized into a clean and simple folder structure. If you prefer plain old CSS then that\'s fine too, just edit the stylesheet.</p>',
) ),
'text_four' => array( 'text', array(
'title' => '',
'column-classes' => 'one-third first',
'text' => '<h4><span class="dashicons dashicons-chart-area"></span> Gulpfile.js</h4><p>Genesis Starter includes a powerful Gulp setup to compile Sass, minify scripts, optimize images and run BrowserSync to refresh the page automatically.</p>',
) ),
'text_five' => array( 'text', array(
'title' => '',
'column-classes' => 'one-third',
'text' => '<h4><span class="dashicons dashicons-tagcloud"></span> Flexible Widgets</h4><p>Set the column width on each widget to create any type of layout. Genesis Starter comes with 5 site-wide widget areas and unlimited front-page widgets.</p>',
) ),
'text_six' => array( 'text', array(
'title' => '',
'column-classes' => 'one-third',
'text' => '<h4><span class="dashicons dashicons-admin-customizer"></span> Customizable</h4><p>Genesis Starter comes with just the right amount of theme customizer options. The theme is easy for users to customize but still clean and lightweight.</p>',
) ),
),
'front-page-3' => array(
'text_custom' => array( 'text', array(
'title' => '',
'column-classes' => 'two-thirds first',
'text' => '<h2>Easy to use customizer settings</h2><p>Heaps of theme customizer settings to make it easy for users to customize the theme to their liking. Out of the box the theme includes 10 color options, 3 featured section background images and the correct logo upload functionality. Also included is a plugin activation function to make it easy for you to notify users of recommended and required plugins. There are 2 plugins recommended by this theme, Simple Social Icons and Genesis Widget Column Classes. Simple Social Icons is an easy to use social media links plugin with SVG icons and Genesis Widget Column Classes is a great plugin that adds the Genesis Column Classes to widgets which allows users to create flexible widget-based page layouts.</p><a href="#" class="button">Read More</a>',
) ),
),
'front-page-4' => array(
'text_custom' => array( 'text', array(
'title' => '',
'text' => '<p class="one-half first"><strong>All of the widgets, pages and menus have been created automatically with the new Starter Content feature.</strong> One of the hardest things for people setting up sites with WordPress for the first time is understanding what themes are and how a given theme can work for you, especially when there’s no content there to visualize. There are also significant gaps between local theme previews, screenshots, and .org previews. Even when there are easy-to-use site customization tools, it is difficult to figure out where to start and what things are going to be like.</p><p class="one-half">To help users along that path, WordPress 4.7 introduces the concept of “starter content” – theme-specific selections of content to help showcase a theme to users and serve as a starting point for further setup of new sites. Starter content works especially well in tandem with visible edit shortcuts, allowing users to not only see what content might work best where within a theme, but from there to be able to jump to building off of that base without having to initially spend time figuring out, say, which widgets areas map where.</p>',
) ),
),
'front-page-5' => array(
'text_custom' => array( 'text', array(
'title' => '',
'column-classes' => 'two-thirds first',
'text' => '<h2>Responsive &amp; accessible menus</h2><p>You\'ll notice some slight differences between the Genesis Starter themes navigation menu\'s and the default Genesis Sample theme\'s. Firstly, the menu\'s have been repositioned. The primary menu is now in the header-right area but uses the correct markup which fixes the existing problem of placing a custom menu in the Header Right Widget area. The secondary menu is located underneath the header, where the primary menu normally is. Both menus are fully responsive and accessible.</p>',
) ),
),
'before-header' => array(
'text_custom' => array( 'text', array(
'title' => '',
'text' => '<p>Perfect place for contact info or a site-wide notice.</p><span class="close dashicons dashicons-no-alt"></span>',
) ),
),
'header-right' => array(
'text_custom' => array( 'text', array(
'title' => '',
'text' => '<button class="small">Header Right</button>',
) ),
),
'before-footer' => array(
'text_custom' => array( 'text', array(
'title' => '',
'text' => '<h3>Before Footer Widget Area</h3><p>This widget area is perfect for a final call to action or a newsletter signup form.</p>',
) ),
),
'footer-widgets' => array(
'text_one' => array( 'text', array(
'title' => 'About',
'column-classes' => 'one-fourth first',
'text' => '<p>Flexible footer widgets with easy to change column widths. Simply go to the Customizer or Widget settings page and change the footer width in one click.</p>',
) ),
'text_two' => array( 'text', array(
'title' => 'Contact',
'column-classes' => 'one-fourth',
'text' => '<ul><li>555-4-634-2313</li><li>info@seothemes.net</li><li>123 Main Street New York, NY 10001</li></ul>',
) ),
'text_three' => array( 'search', array(
'title' => 'Search',
'column-classes' => 'one-fourth',
) ),
'text_four' => array( 'simple-social-icons', array(
'title' => 'Social',
'column-classes' => 'one-fourth',
) ),
),
'after-footer' => array(
'text_custom' => array( 'text', array(
'title' => '',
'text' => '© Copyright 2017 Genesis Starter Theme by <a href="https://seothemes.net">Seo Themes</a>. Built on the Genesis Framework.',
) ),
),
),
'posts' => array(
'home',
'about' => array(
'thumbnail' => '{{bg-5}}',
'post_excerpt' => 'This area uses page excerpts as a subtitle.',
'post_content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque congue urna neque, eu eleifend enim venenatis eget. Morbi faucibus, massa id congue rutrum, turpis orci lobortis ipsum, ac volutpat augue dolor ut nulla. Curabitur feugiat, ligula at auctor ornare, enim purus luctus nibh, id auctor est sapien eu est. Mauris porta pellentesque libero vitae rutrum. Quisque tincidunt sapien quis nisl scelerisque, vel accumsan libero rhoncus. Aliquam mattis sodales neque, sed pretium leo suscipit sed. Quisque venenatis aliquam arcu eget placerat. Praesent cursus maximus blandit. Sed ut aliquet libero.</p><p>Vivamus id sapien quis erat interdum cursus eu sed leo. Duis eleifend tristique turpis vel lobortis. Nam rutrum velit sapien, a suscipit purus ullamcorper vel. Nam porttitor finibus leo vitae semper. Cras non efficitur dui, in tincidunt quam. Quisque efficitur, tellus eu convallis rhoncus, felis lacus tristique arcu, ac porta dolor mi vitae est. Morbi fermentum odio justo, convallis aliquet sem tempor vitae.</p><p>Integer convallis quis mi eu mollis. Vivamus nec mi nec felis molestie rhoncus vulputate a magna. Vestibulum vestibulum libero eu mauris convallis, et vestibulum neque suscipit. Aenean lacinia, erat eu commodo efficitur, urna augue mattis arcu, vitae dapibus lacus nunc feugiat enim. Etiam quis auctor quam. Vivamus vel diam velit. Integer egestas non justo in placerat. Integer auctor porttitor aliquam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin ipsum diam, pretium sit amet mattis non, imperdiet ut sem. Nulla dignissim tempus sem eu semper. Donec molestie, nibh eget feugiat maximus, odio metus imperdiet mi, a convallis lectus mauris sed urna. Nunc at diam diam. Maecenas in imperdiet eros. Fusce hendrerit nulla magna, at vestibulum ipsum mattis eu.</p>',
),
'gallery' => array(
'post_type' => 'page',
'post_title' => 'Gallery',
'post_excerpt' => 'To change the subtitle go to Edit Page and edit the excerpt.',
'thumbnail' => '{{bg-3}}',
'post_content' => '<p>This is a gallery page. Simply place the gallery shortcode here or go to the page editor and insert an image gallery.</p><img src="https://unsplash.it/1600/500/?random" alt="Placeholder image">',
),
'blog' => array(
'thumbnail' => '{{bg-3}}',
),
'contact' => array(
'thumbnail' => '{{bg-5}}',
'post_excerpt' => 'Excerpts aren\'t enabled on pages by default.',
'post_content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque congue urna neque, eu eleifend enim venenatis eget. Morbi faucibus, massa id congue rutrum, turpis orci lobortis ipsum, ac volutpat augue dolor ut nulla. Curabitur feugiat, ligula at auctor ornare, enim purus luctus nibh, id auctor est sapien eu est. Mauris porta pellentesque libero vitae rutrum. Quisque tincidunt sapien quis nisl scelerisque, vel accumsan libero rhoncus. Aliquam mattis sodales neque, sed pretium leo suscipit sed. Quisque venenatis aliquam arcu eget placerat. Praesent cursus maximus blandit. Sed ut aliquet libero.</p><p>Vivamus id sapien quis erat interdum cursus eu sed leo. Duis eleifend tristique turpis vel lobortis. Nam rutrum velit sapien, a suscipit purus ullamcorper vel. Nam porttitor finibus leo vitae semper. Cras non efficitur dui, in tincidunt quam. Quisque efficitur, tellus eu convallis rhoncus, felis lacus tristique arcu, ac porta dolor mi vitae est. Morbi fermentum odio justo, convallis aliquet sem tempor vitae.</p><p>Integer convallis quis mi eu mollis. Vivamus nec mi nec felis molestie rhoncus vulputate a magna. Vestibulum vestibulum libero eu mauris convallis, et vestibulum neque suscipit. Aenean lacinia, erat eu commodo efficitur, urna augue mattis arcu, vitae dapibus lacus nunc feugiat enim. Etiam quis auctor quam. Vivamus vel diam velit. Integer egestas non justo in placerat. Integer auctor porttitor aliquam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin ipsum diam, pretium sit amet mattis non, imperdiet ut sem. Nulla dignissim tempus sem eu semper. Donec molestie, nibh eget feugiat maximus, odio metus imperdiet mi, a convallis lectus mauris sed urna. Nunc at diam diam. Maecenas in imperdiet eros. Fusce hendrerit nulla magna, at vestibulum ipsum mattis eu.</p>',
),
),
'attachments' => array(
'bg-1' => array(
'post_title' => _x( 'Background 1', 'Theme starter content', 'genesis-starter' ),
'file' => 'images/bg-1.jpg',
),
'bg-3' => array(
'post_title' => _x( 'Background 3', 'Theme starter content', 'genesis-starter' ),
'file' => 'images/bg-3.jpg',
),
'bg-5' => array(
'post_title' => _x( 'Background 5', 'Theme starter content', 'genesis-starter' ),
'file' => 'images/bg-5.jpg',
),
),
'options' => array(
'show_on_front' => 'page',
'page_on_front' => '{{home}}',
'page_for_posts' => '{{blog}}',
),
'nav_menus' => array(
'primary' => array(
'name' => __( 'Primary Navigation', 'genesis-starter' ),
'items' => array(
'page_home',
'page_about',
'gallery' => array(
'title' => 'Gallery',
'url' => get_home_url() . '/gallery',
),
'page_blog',
'page_contact',
),
),
),
) );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment