├── snippets ├── do-shortcode.sublime-snippet ├── page-template.sublime-snippet ├── remove-post-info.sublime-snippet ├── show-page-content.sublime-snippet ├── unregister-primary-sidebar.sublime-snippet ├── unregister-secondary-sidebar.sublime-snippet ├── header_remove-header-right.sublime-snippet ├── breadcrumbs_remove-breadcrumbs.sublime-snippet ├── header_remove-site-title.sublime-snippet ├── remove-archive-pagination.sublime-snippet ├── nav_remove-primary-nav.sublime-snippet ├── comments-link.sublime-snippet ├── remove-entry-meta.sublime-snippet ├── add-post-navigation.sublime-snippet ├── remove-entry-title.sublime-snippet ├── action.sublime-snippet ├── add-HTML5-markup-structure.sublime-snippet ├── nav_css_center-nav-menus.sublime-snippet ├── layout_force-full-layout.sublime-snippet ├── remove-entry-content.sublime-snippet ├── remove-post-navigation.sublime-snippet ├── author_box_enable-author-box-archives.sublime-snippet ├── footer_enable-footer-widgets.sublime-snippet ├── add-archive-settings-to-cpt.sublime-snippet ├── author_box_remove-author-box-single-posts.sublime-snippet ├── dashicons.sublime-snippet ├── author-name-linking-author-page.sublime-snippet ├── author_box_enable-author-box-single-posts.sublime-snippet ├── layout_force-content-sidebar-layout.sublime-snippet ├── layout_force-sidebar-content-layout.sublime-snippet ├── remove-post-image.sublime-snippet ├── nav_unregister-primary-nav.sublime-snippet ├── nav_unregister-secondary-nav.sublime-snippet ├── header_remove-tagline-site-description.sublime-snippet ├── filter.sublime-snippet ├── breadcrumbs_reposition-breadcrumbs.sublime-snippet ├── layout_force-content-sidebar-sidebar-layout.sublime-snippet ├── layout_force-sidebar-content-sidebar-layout.sublime-snippet ├── layout_force-sidebar-sidebar-content-layout.sublime-snippet ├── nav_reposition-primary-nav.sublime-snippet ├── register-custom-image-size.sublime-snippet ├── add-category-support-cpt.sublime-snippet ├── css_dashicons-css.sublime-snippet ├── nav_reposition-secondary-nav.sublime-snippet ├── add_structural-wraps.sublime-snippet ├── display-widget-area.sublime-snippet ├── remove-entry-header-markup.sublime-snippet ├── excerpts_modify-excerpt-length.sublime-snippet ├── header_remove-header.sublime-snippet ├── default-featured-image.sublime-snippet ├── author_box_customize-author-box-title.sublime-snippet ├── author_box_modify-gravatar-size.sublime-snippet ├── comments_modify-author-says-text-in comments.sublime-snippet ├── font-awesome.sublime-snippet ├── add-id-site-inner.sublime-snippet ├── move-featured-image.sublime-snippet ├── reposition-archive-pagination.sublime-snippet ├── comments_modify_comments-title-text.sublime-snippet ├── excerpts_modify-read-more-excerpts.sublime-snippet ├── comments_modify-size-gravatar-comments.sublime-snippet ├── genesis-simple-share.sublime-snippet ├── linked-featured-image.sublime-snippet ├── content_modify-read-more-more-tag.sublime-snippet ├── line-break-widget-titles.sublime-snippet ├── google-fonts.sublime-snippet ├── breadcrumbs_remove-home-breadcrumbs.sublime-snippet ├── comments_modify_comment-link-text.sublime-snippet ├── custom-post-content.sublime-snippet ├── content_limit_modify-read-more-content-limit.sublime-snippet ├── logo-linking-site-url.sublime-snippet ├── modify-post-info.sublime-snippet ├── remove-entry-meta-markup.sublime-snippet ├── comments_remove-comment-form-allowed-tags.sublime-snippet ├── comments_modify-submit-button-text-in-comments.sublime-snippet ├── footer_remove-footer.sublime-snippet ├── search_search-form-input-box.sublime-snippet ├── add-body-class.sublime-snippet ├── comments_modify-speak-your-mind-title-in-comments.sublime-snippet ├── register-widget-area.sublime-snippet ├── modify-entry-meta.sublime-snippet ├── header_modify-header-url.sublime-snippet ├── search_search-form-input-button.sublime-snippet ├── comma-separated-terms-taxonomy.sublime-snippet ├── enqueue-script.sublime-snippet ├── search_css_clear-input.sublime-snippet ├── genesis-get-image-example.sublime-snippet ├── header_remove-header-conditionally.sublime-snippet ├── footer_modify-footer.sublime-snippet ├── footer_modify-entire-footer-hook.sublime-snippet ├── template-redirect.sublime-snippet ├── remove-archive-blog-templates.sublime-snippet ├── header_wide-header.sublime-snippet ├── be_change-posts-per-page.sublime-snippet ├── css_font-awesome-css.sublime-snippet ├── modify-previous-page-next-page-text.sublime-snippet ├── featured-image-below-title.sublime-snippet ├── footer_footer-widgets-footer-outside.sublime-snippet ├── custom-loop.sublime-snippet ├── custom-site-title.sublime-snippet ├── layout_unregister-layouts.sublime-snippet ├── remove-entry-meta-markup-conditionally.sublime-snippet ├── nav_footer-nav-menu.sublime-snippet ├── breadcrumbs_add-blog-breadcrumbs.sublime-snippet ├── split-entries-columns-column-classes.sublime-snippet ├── post-navigation-cpt-entries.sublime-snippet ├── built-in-post-counter.sublime-snippet ├── equal-heights-js.sublime-snippet ├── nav_add-nav-extras.sublime-snippet ├── breadcrumbs_modify-breadcrumbs-display.sublime-snippet ├── two-column-50-50-widget-areas.sublime-snippet ├── header_inline-logo.sublime-snippet ├── two-column-33-66-widget-areas.sublime-snippet ├── two-column-66-33-widget-areas.sublime-snippet ├── three-column-widget-areas.sublime-snippet ├── four-column-widget-areas.sublime-snippet └── custom-widget.sublime-snippet └── README.md /snippets/do-shortcode.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | Do/Display Shortcode in WordPress 6 | source.php 7 | 8 | -------------------------------------------------------------------------------- /snippets/page-template.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 12 | Custom Page Template in Genesis 13 | 14 | -------------------------------------------------------------------------------- /snippets/remove-post-info.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove post info in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/show-page-content.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Show page content in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/unregister-primary-sidebar.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Unregister primary sidebar in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/unregister-secondary-sidebar.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Unregister secondary sidebar in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/header_remove-header-right.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove Header Right widget area in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/breadcrumbs_remove-breadcrumbs.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove breadcrumbs in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/header_remove-site-title.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove the site title in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/remove-archive-pagination.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove Archive Pagination in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/nav_remove-primary-nav.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove primary navigation menu in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/comments-link.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 4 | Comments to this post 5 | 7 | Display the URL to the current post's comments in WordPress 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/remove-entry-meta.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove entry meta from entry footer in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/add-post-navigation.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Add post navigation (previous/next) for single Posts in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/remove-entry-title.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove entry/post title in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/action.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | Add action callback 9 | act 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/add-HTML5-markup-structure.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Add HTML5 markup structure in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/nav_css_center-nav-menus.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 11 | Center Nav Menus in Genesis 12 | source.css 13 | 14 | -------------------------------------------------------------------------------- /snippets/layout_force-full-layout.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | source.php 7 | Force full width content layout setting in Genesis 8 | 9 | -------------------------------------------------------------------------------- /snippets/remove-entry-content.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove entry content (post content) in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/remove-post-navigation.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove post navigation in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/author_box_enable-author-box-archives.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Enable Author Box on archive pages in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/footer_enable-footer-widgets.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Enable (add theme support for) Footer Widget Areas in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/add-archive-settings-to-cpt.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Add Archive Settings support to a CPT in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/author_box_remove-author-box-single-posts.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove the Author Box on single posts in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/dashicons.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Load Dashicons 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/author-name-linking-author-page.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | Author name linking to author page in WordPress 6 | source.php 7 | 8 | -------------------------------------------------------------------------------- /snippets/author_box_enable-author-box-single-posts.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Enable/Display Author Box on single posts in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/layout_force-content-sidebar-layout.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | source.php 7 | Force content-sidebar layout setting in Genesis 8 | 9 | -------------------------------------------------------------------------------- /snippets/layout_force-sidebar-content-layout.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | source.php 7 | Force sidebar-content layout setting in Genesis 8 | 9 | -------------------------------------------------------------------------------- /snippets/remove-post-image.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove post image (Featured image coming from theme settings) in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/nav_unregister-primary-nav.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | __( 'Secondary Navigation Menu', 'genesis' ) ) ); 5 | ]]> 6 | Unregister primary navigation menu in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/nav_unregister-secondary-nav.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | __( 'Primary Navigation Menu', 'genesis' ) ) ); 5 | ]]> 6 | Unregister secondary navigation menu in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/header_remove-tagline-site-description.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Remove Tagline (Site Description) in Genesis 7 | source.php 8 | 9 | -------------------------------------------------------------------------------- /snippets/filter.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 11 | Add filter callback 12 | fil 13 | source.php 14 | 15 | -------------------------------------------------------------------------------- /snippets/breadcrumbs_reposition-breadcrumbs.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Reposition breadcrumbs in Genesis 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/layout_force-content-sidebar-sidebar-layout.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | source.php 7 | Force content-sidebar-sidebar layout setting in Genesis 8 | 9 | -------------------------------------------------------------------------------- /snippets/layout_force-sidebar-content-sidebar-layout.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | source.php 7 | Force sidebar-content-sidebar layout setting in Genesis 8 | 9 | -------------------------------------------------------------------------------- /snippets/layout_force-sidebar-sidebar-content-layout.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | source.php 7 | Force sidebar-sidebar-content layout setting in Genesis 8 | 9 | -------------------------------------------------------------------------------- /snippets/nav_reposition-primary-nav.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Reposition primary navigation menu in Genesis 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/register-custom-image-size.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Register custom image size in WordPress 7 | source.php, text.plain 8 | ris 9 | 10 | -------------------------------------------------------------------------------- /snippets/add-category-support-cpt.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | Add Category support to a CPT in WordPress 9 | source.php 10 | 11 | -------------------------------------------------------------------------------- /snippets/css_dashicons-css.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 12 | Dashicons CSS 13 | source.css 14 | 15 | -------------------------------------------------------------------------------- /snippets/nav_reposition-secondary-nav.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Reposition secondary navigation menu in Genesis 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/add_structural-wraps.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 12 | Add support for structural wraps in Genesis 13 | source.php 14 | 15 | -------------------------------------------------------------------------------- /snippets/display-widget-area.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '
', 5 | 'after' => '
', 6 | ) ); 7 | ]]>
8 | Display a Widget Area in Genesis 9 | dwa 10 | source.php 11 |
12 | -------------------------------------------------------------------------------- /snippets/remove-entry-header-markup.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Remove entry header markup in Genesis 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/excerpts_modify-excerpt-length.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Modify excerpts length in WordPress 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/header_remove-header.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | source.php 9 | Remove Header incl. the markup in Genesis 10 | 11 | -------------------------------------------------------------------------------- /snippets/default-featured-image.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${1:related}' ) ) : '' . get_the_title() . ''; 4 | ]]> 5 | Show/Display Featured image if present, otherwise show a default image in Genesis 6 | source.php 7 | 8 | -------------------------------------------------------------------------------- /snippets/author_box_customize-author-box-title.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | About the Author}'; 7 | } 8 | ]]> 9 | Customize the author box title in Genesis 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/author_box_modify-gravatar-size.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Modify the size of the Gravatar in the author box in Genesis 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/comments_modify-author-says-text-in comments.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Modify the author says text in comments in Genesis 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/font-awesome.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Load Font Awesome in WordPress 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/add-id-site-inner.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 12 | Add an ID to .site-inner in Genesis 13 | source.php 14 | 15 | -------------------------------------------------------------------------------- /snippets/move-featured-image.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Move Featured image to the left of Post title in Genesis 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/reposition-archive-pagination.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | Reposition Archive Pagination in Genesis 9 | source.php 10 | 11 | -------------------------------------------------------------------------------- /snippets/comments_modify_comments-title-text.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | Discussion}'; 7 | return \$title; 8 | } 9 | ]]> 10 | Modify comments title text in comments in Genesis 11 | source.php 12 | 13 | -------------------------------------------------------------------------------- /snippets/excerpts_modify-read-more-excerpts.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ${1:Continue Reading}'; 7 | } 8 | ]]> 9 | Modify read more for Excerpts in WordPress 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/comments_modify-size-gravatar-comments.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 10 | Modify the size of the Gravatar in comments in Genesis 11 | source.php 12 | 13 | -------------------------------------------------------------------------------- /snippets/genesis-simple-share.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | icons ); 6 | } 7 | /* the 'work' thing changes the name... so the div class will be "share-work" in this case */ 8 | ]]> 9 | Genesis Simple Share via function 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/linked-featured-image.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | %s', get_permalink(), \$image, the_title_attribute( 'echo=0' ) ); 5 | } 6 | ]]> 7 | Show/Display Featured image linking to permalink in Genesis 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/content_modify-read-more-more-tag.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ${1:Continue Reading}'; 7 | } 8 | ]]> 9 | Modify read more link when using More Tag in WordPress 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/line-break-widget-titles.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ", \$title ); 7 | return \$title; 8 | } 9 | ]]> 10 | Line breaks in widget titles. [br] gets replaced by a line break 11 | source.php 12 | 13 | -------------------------------------------------------------------------------- /snippets/google-fonts.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Load Google Fonts in WordPress 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/breadcrumbs_remove-home-breadcrumbs.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | = 1.5 5 | function ${1:youruniqueprefix}_breadcrumb_home_link( \$crumb ) { 6 | \$crumb = ''; 7 | return \$crumb; 8 | } 9 | ]]> 10 | Remove "Home" from Breadcrumbs in Genesis 11 | source.php 12 | 13 | -------------------------------------------------------------------------------- /snippets/comments_modify_comment-link-text.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | Modify the comment link text in comments in Genesis 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/custom-post-content.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 14 | source.php 15 | Custom post content function in Genesis 16 | 17 | -------------------------------------------------------------------------------- /snippets/content_limit_modify-read-more-content-limit.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ${1:Continue Reading}'; 7 | } 8 | ]]> 9 | Modify read more link when using the Content Limit in Genesis 10 | source.php 11 | 12 | -------------------------------------------------------------------------------- /snippets/logo-linking-site-url.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '; 4 | 5 | printf( '%s', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), \$logo ); 6 | ]]> 7 | Logo linking to home URL in WordPress 8 | source.php 9 | 10 | -------------------------------------------------------------------------------- /snippets/modify-post-info.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 13 | Modify post info in the entry header in Genesis 14 | source.php 15 | 16 | -------------------------------------------------------------------------------- /snippets/remove-entry-meta-markup.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | Remove entry meta from entry footer incl. markup in Genesis 9 | source.php 10 | 11 | -------------------------------------------------------------------------------- /snippets/comments_remove-comment-form-allowed-tags.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 10 | Remove the allowed tags text above the comment form in WordPress 11 | source.php 12 | 13 | -------------------------------------------------------------------------------- /snippets/comments_modify-submit-button-text-in-comments.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 10 | Modify the submit button text in comments in Genesis 11 | source.php 12 | 13 | -------------------------------------------------------------------------------- /snippets/footer_remove-footer.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 10 | source.php 11 | Remove footer incl. the markup in Genesis 12 | 13 | -------------------------------------------------------------------------------- /snippets/search_search-form-input-box.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 14 | source.php 15 | Modify Search Input Placeholder Text in Genesis 16 | 17 | -------------------------------------------------------------------------------- /snippets/add-body-class.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 15 | source.php 16 | Add custom body class in WordPress 17 | 18 | -------------------------------------------------------------------------------- /snippets/comments_modify-speak-your-mind-title-in-comments.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 12 | Modify the speak your mind title in comments in Genesis 13 | source.php 14 | 15 | -------------------------------------------------------------------------------- /snippets/register-widget-area.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${1:my-sidebar}', 7 | 'name' => __( '${2:My Sidebar}', '${4:my-theme-text-domain}' ), 8 | 'description' => __( '${3:A description of the intended purpose or location}', '${4:my-theme-text-domain}' ), 9 | ) 10 | ); 11 | ]]> 12 | Register a Widget Area in Genesis 13 | rwa 14 | source.php 15 | 16 | -------------------------------------------------------------------------------- /snippets/modify-entry-meta.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 14 | Modify entry meta in the entry footer in Genesis 15 | source.php 16 | 17 | -------------------------------------------------------------------------------- /snippets/header_modify-header-url.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | %s', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) ); 7 | return sprintf( '<%1\$s class="site-title">%2\$s', \$wrap, \$inside ); 8 | } 9 | ]]> 10 | source.php 11 | Modify the header URL in Genesis 12 | 13 | -------------------------------------------------------------------------------- /snippets/search_search-form-input-button.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 14 | customsearchbutton 15 | source.php,source.php 16 | Modify Search Button Text in Genesis 17 | 18 | -------------------------------------------------------------------------------- /snippets/comma-separated-terms-taxonomy.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ID , '\${1:staff-position}' ); 5 | if ( ! empty( \$terms ) ) { 6 | echo ''; 12 | } 13 | } 14 | ]]> 15 | Comma separated terms for a specific taxonomy in WordPress 16 | source.php 17 | 18 | -------------------------------------------------------------------------------- /snippets/enqueue-script.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 11 | Enqueue Scripts in WordPress 12 | source.php 13 | 14 | -------------------------------------------------------------------------------- /snippets/search_css_clear-input.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 11 | Clear Search Input field's text when it gets focus 12 | source.css 13 | 14 | -------------------------------------------------------------------------------- /snippets/genesis-get-image-example.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${3:custom-square-thumbnail}', 7 | 'attr' => array( 8 | 'class' => '${4:alignleft}', 9 | ) 10 | ); 11 | 12 | // Get the featured image HTML 13 | \$image = genesis_get_image( \$image_args ); 14 | 15 | echo ''. \$image .''; 16 | } 17 | ]]> 18 | Example of using genesis_get_image with its arguments in Genesis 19 | source.php 20 | 21 | -------------------------------------------------------------------------------- /snippets/header_remove-header-conditionally.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 13 | Remove Header conditionally in Genesis 14 | source.php 15 | 16 | -------------------------------------------------------------------------------- /snippets/footer_modify-footer.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | My Custom Link · Built on the Genesis Framework'; 8 | return \$creds; 9 | } 10 | ]]> 11 | Customize Footer in Genesis 12 | source.php 13 | 14 | -------------------------------------------------------------------------------- /snippets/footer_modify-entire-footer-hook.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | ${1:

© Copyright 2015 My Domain · All Rights Reserved · Powered by WordPress · Admin

} 9 |
12 | Customize the entire footer text using hook in Genesis 13 | source.php 14 |
15 | -------------------------------------------------------------------------------- /snippets/template-redirect.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 20 | Template Redirect in WordPress 21 | source.php 22 | 23 | -------------------------------------------------------------------------------- /snippets/remove-archive-blog-templates.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 19 | Remove Archive and Blog Page templates in Genesis 20 | source.php 21 | 22 | -------------------------------------------------------------------------------- /snippets/header_wide-header.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | Home'; 11 | 12 | } 13 | /* Add this CSS 14 | 15 | .site-header { 16 | padding: 0; 17 | } 18 | 19 | .site-header .wrap { 20 | text-align: center; 21 | } 22 | 23 | .site-header img { 24 | vertical-align: top; 25 | } 26 | 27 | */ 28 | ]]> 29 | Wide Header in Genesis 30 | source.php 31 | 32 | -------------------------------------------------------------------------------- /snippets/be_change-posts-per-page.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | is_main_query() && !is_admin() && ${1:is_post_type_archive( 'event' )} ) { 15 | \$query->set( 'posts_per_page', '${2:18}' ); 16 | } 17 | 18 | } 19 | ]]> 20 | Change Posts Per Page using pre_get_posts in WordPress 21 | source.php 22 | 23 | -------------------------------------------------------------------------------- /snippets/css_font-awesome-css.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 26 | Font Awesome CSS 27 | source.css 28 | 29 | -------------------------------------------------------------------------------- /snippets/modify-previous-page-next-page-text.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 15 | Modify Previous Page and Next Page text in Content Archives Post Navigation in Genesis 16 | source.php 17 | 18 | -------------------------------------------------------------------------------- /snippets/featured-image-below-title.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '; 11 | genesis_image( array( 'size' => '${1:single-thumbnail}' ) ); 12 | echo ''; 13 | } 14 | } 15 | ]]> 16 | Show/Display Featured image below title on Posts in Genesis 17 | source.php 18 | 19 | -------------------------------------------------------------------------------- /snippets/footer_footer-widgets-footer-outside.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 15 | Move Footer widgets and Footer outside Site Container in Genesis 16 | source.php 17 | 18 | -------------------------------------------------------------------------------- /snippets/custom-loop.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '', 18 | 'category_name' => 'blog', // use category slug 19 | 'order' => 'ASC', 20 | 'orderby' => 'title', 21 | 'paged' => \$paged, 22 | 'posts_per_page' => 5} 23 | )); 24 | 25 | genesis_custom_loop( \$args ); 26 | } 27 | 28 | genesis(); 29 | ]]> 30 | source.php 31 | Setup custom loop in Genesis 32 | 33 | -------------------------------------------------------------------------------- /snippets/custom-site-title.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | Reading with custom HTML. 6 | * @author Sridhar Katakam 7 | * @link http://sridharkatakam.com/replace-site-title-text-custom-html-genesis/ 8 | * 9 | * @param string original title text 10 | * @return string modified title HTML 11 | */ 12 | function custom_genesis_seo_title( \$title ) { 13 | \$title = '

${2:Custom HTML here}

'; 14 | return \$title; 15 | } 16 | ]]>
17 | Replace Site Title text entered in Settings > Reading with custom HTML in Genesis 18 | source.php 19 |
20 | -------------------------------------------------------------------------------- /snippets/layout_unregister-layouts.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 21 | source.php 22 | Unregister layouts in Genesis 23 | 24 | -------------------------------------------------------------------------------- /snippets/remove-entry-meta-markup-conditionally.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 20 | Remove entry meta from entry footer incl. markup conditionally in Genesis 21 | source.php 22 | 23 | -------------------------------------------------------------------------------- /snippets/nav_footer-nav-menu.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | __( 'Primary Navigation Menu', 'genesis' ), 6 | 'secondary' => __( 'Secondary Navigation Menu', 'genesis' ), 7 | 'footer' => __( 'Footer Navigation Menu', 'genesis' ), 8 | ) ); 9 | 10 | // Hook menu in footer 11 | add_action( 'genesis_footer', 'sk_footer_menu', 7 ); 12 | function sk_footer_menu() { 13 | printf( ''; 23 | } 24 | ]]> 25 | Navigation Menu in Genesis Footer 26 | source.php 27 | 28 | -------------------------------------------------------------------------------- /snippets/breadcrumbs_add-blog-breadcrumbs.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ' . get_the_title( get_option( 'page_for_posts' ) ) .' ' . \$args['sep'] . ' ' . \$crumb; 14 | else 15 | return \$crumb; 16 | } 17 | add_filter( 'genesis_single_crumb', 'be_add_blog_crumb', 10, 2 ); 18 | add_filter( 'genesis_archive_crumb', 'be_add_blog_crumb', 10, 2 ); 19 | ]]> 20 | Add "Blog" to Breadcrumbs in Genesis 21 | source.php 22 | 23 | -------------------------------------------------------------------------------- /snippets/split-entries-columns-column-classes.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | current_post || 0 == \$wp_query->current_post % \$columns ) 16 | \$classes[] = 'first'; 17 | } 18 | 19 | return \$classes; 20 | } 21 | add_filter( 'post_class', '${2:be_portfolio_post_class}' ); 22 | ]]> 23 | Split entries in grid columns using Column Classes in Genesis 24 | source.php 25 | 26 | -------------------------------------------------------------------------------- /snippets/post-navigation-cpt-entries.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '; 7 | previous_post_link('
« %link
', '%title' ); 8 | next_post_link('
%link »
', '%title' ); 9 | echo ''; 10 | } 11 | 12 | /* Sample CSS: 13 | 14 | .${3:prev-next-post-links} { 15 | overflow: hidden; 16 | margin-bottom: 40px; 17 | } 18 | 19 | .${4:previous-post-link} { 20 | float: left; 21 | } 22 | 23 | .${5:next-post-link} { 24 | float: right; 25 | } 26 | 27 | */ 28 | 29 | ]]>
30 | Add post navigation (previous and next) for single entries of a CPT in Genesis 31 | source.php 32 |
33 | -------------------------------------------------------------------------------- /snippets/built-in-post-counter.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | current_post 12 | * 13 | * Count starts at 0 (first post is 0, second post is 1 ) 14 | */ 15 | 16 | /** 17 | * Display ad after third post 18 | * 19 | * @author Bill Erickson 20 | * @link http://www.billerickson.net/code/use-the-built-in-post-counter/ 21 | */ 22 | function be_ad_after_third_post() { 23 | global \$wp_query; 24 | if( 2 == \$wp_query->current_post ) 25 | echo 'This is an ad!' 26 | } 27 | add_action( 'genesis_after_entry', 'be_ad_after_third_post' ); 28 | ]]> 29 | Built-in WordPress post counter example in Genesis 30 | source.php 31 | 32 | -------------------------------------------------------------------------------- /snippets/equal-heights-js.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | rowTop) { 17 | rowIndex++; 18 | rows[rowIndex] = []; 19 | rowTop = \$el.offset().top; 20 | maxHeight[rowIndex] = 0; 21 | } 22 | if (\$el.height() > maxHeight[rowIndex]) { 23 | maxHeight[rowIndex] = \$el.height(); 24 | } 25 | rows[rowIndex].push(\$el); 26 | }); 27 | for (row = 1; row <= rowIndex; row++) { 28 | for (i = 0; i <= rows[row].length; i++) { 29 | \$(rows[row][i]).height(maxHeight[row]); 30 | } 31 | } 32 | } 33 | \$(window).on('resize load', equalHeights); 34 | 35 | }); 36 | ]]> 37 | Equal Heights JS code 38 | source.js 39 | 40 | -------------------------------------------------------------------------------- /snippets/nav_add-nav-extras.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | theme_location ) 15 | return \$menu; 16 | 17 | // Uncomment this block to add a search form to the navigation menu 18 | /* 19 | ob_start(); 20 | get_search_form(); 21 | \$search = ob_get_clean(); 22 | \$menu .= ''; 23 | */ 24 | 25 | // Uncomment this block to add the date to the navigation menu 26 | /* 27 | \$menu .= '
  • ' . date_i18n( get_option( 'date_format' ) ) . '
  • '; 28 | */ 29 | 30 | return \$menu; 31 | } 32 | ]]>
    33 | Add Nav Extras in WordPress 34 | source.php 35 |
    36 | -------------------------------------------------------------------------------- /snippets/breadcrumbs_modify-breadcrumbs-display.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '; 10 | \$args['suffix'] = ''; 11 | \$args['heirarchial_attachments'] = true; // Genesis 1.5 and later 12 | \$args['heirarchial_categories'] = true; // Genesis 1.5 and later 13 | \$args['display'] = true; 14 | \$args['labels']['prefix'] = 'You are here: '; 15 | \$args['labels']['author'] = 'Archives for '; 16 | \$args['labels']['category'] = 'Archives for '; // Genesis 1.6 and later 17 | \$args['labels']['tag'] = 'Archives for '; 18 | \$args['labels']['date'] = 'Archives for '; 19 | \$args['labels']['search'] = 'Search for '; 20 | \$args['labels']['tax'] = 'Archives for '; 21 | \$args['labels']['post_type'] = 'Archives for '; 22 | \$args['labels']['404'] = 'Not found: '; // Genesis 1.5 and later 23 | return \$args; 24 | } 25 | ]]> 26 | Modify breadcrumb arguments in Genesis 27 | source.php 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Genesis 2 | Sublime Text Snippets for Genesis WordPress Framework 3 | 4 | Currently these snippets are to be downloaded and placed inside a folder on your computer to use them. These can not be downloaded from Sublime Text's package manager (yet). If you are familiar with [submitting a Sublime Text package](https://packagecontrol.io/docs/submitting_a_package) and would like to help, please get in touch. 5 | 6 | 7 | ## How to Install 8 | 9 | 1. Sublime Text > Preferences > Browse Packages 10 | 2. Go inside `User` folder 11 | 3. Click on the 'Download ZIP' button at the right to download a zip file of all the snippets. Extract the zip file and copy the extracted folder to the above `User` folder. You may want to rename the folder from `Genesis-master` to just `Genesis`. 12 | 13 | 14 | ## How to Use 15 | 16 | Press Cmd + Shift + P (on Mac) or Ctrl + Shift + P (on PC) when you are inside Sublime Text and start typing the Genesis code snippet that you would like to insert. 17 | 18 | When you find the match (or after you have pressed the up/down arrow key to select one) hit return to paste the snippet at the cursor location. 19 | 20 | Note that most of the snippets work only in PHP files. 21 | 22 | ### Overview video and blog post 23 | 24 | https://sridharkatakam.com/sublime-text-snippets-for-genesis/ 25 | 26 | ### Credit goes to 27 | 28 | [StudioPress](http://my.studiopress.com/snippets/), [Gary Jones](https://github.com/GaryJones/sublime/tree/master/snippets), [Justin Tallant](http://justintallant.com/genesis-sublime-text-2-snippets/) and [Bill Erickson](http://www.billerickson.net/code/). -------------------------------------------------------------------------------- /snippets/two-column-50-50-widget-areas.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${1:home-featured-left}', 6 | 'name' => '${2:Home Featured Left}', 7 | 'description' => 'This is the ${2:Home Featured Left} section' 8 | ) ); 9 | genesis_register_sidebar( array( 10 | 'id' => '${3:home-featured-right}', 11 | 'name' => '${4:Home Featured Right}', 12 | 'description' => 'This is the ${4:Home Featured Right} section' 13 | ) ); 14 | 15 | // Display Home Featured Left and Home Featured Right widget areas in equal half columns below Header on Frontpage 16 | add_action( '${5:genesis_after_header}', '${6:sk_home_featured}' ); 17 | function ${6:sk_home_featured}() { 18 | 19 | if ( ${7:is_front_page()} ) { 20 | echo '
    '; 21 | 22 | genesis_widget_area( '${1:home-featured-left}', array( 23 | 'before' => '', 25 | ) ); 26 | 27 | genesis_widget_area( '${3:home-featured-right}', array( 28 | 'before' => '', 30 | ) ); 31 | 32 | echo '
    '; 33 | } 34 | 35 | } 36 | /* Sample CSS: 37 | 38 | .home-featured { 39 | margin-top: 40px; 40 | } 41 | 42 | @media only screen and (max-width: 800px) { 43 | 44 | .${1:home-featured-left} { 45 | margin-bottom: 40px; 46 | } 47 | 48 | } */ 49 | ]]>
    50 | 2-Column 50% | 50% widget areas 51 | source.php 52 |
    53 | -------------------------------------------------------------------------------- /snippets/header_inline-logo.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '; 18 | 19 | \$inside = sprintf( '%s%s', trailingslashit( home_url() ), \$logo, get_bloginfo( 'name' ) ); 20 | 21 | // Determine which wrapping tags to use 22 | \$wrap = genesis_is_root_page() && 'title' === genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p'; 23 | 24 | // A little fallback, in case an SEO plugin is active 25 | \$wrap = genesis_is_root_page() && ! genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : \$wrap; 26 | 27 | // And finally, \$wrap in h1 if HTML5 & semantic headings enabled 28 | \$wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h1' : \$wrap; 29 | 30 | return sprintf( '<%1\$s %2\$s>%3\$s', \$wrap, genesis_attr( 'site-title' ), \$inside ); 31 | 32 | } 33 | ]]> 34 | Better Responsive Inline Logo in Genesis 35 | source.php 36 | 37 | -------------------------------------------------------------------------------- /snippets/two-column-33-66-widget-areas.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${1:home-featured-left}', 6 | 'name' => '${2:Home Featured Left}', 7 | 'description' => 'This is the ${2:Home Featured Left} section' 8 | ) ); 9 | genesis_register_sidebar( array( 10 | 'id' => '${3:home-featured-right}', 11 | 'name' => '${4:Home Featured Right}', 12 | 'description' => 'This is the ${4:Home Featured Right} section' 13 | ) ); 14 | 15 | // Display Home Featured Left and Home Featured Right widget areas in one third - two thrid columns below Header on Frontpage 16 | add_action( '${5:genesis_after_header}', '${6:sk_home_featured}' ); 17 | function ${6:sk_home_featured}() { 18 | 19 | if ( ${7:is_front_page()} ) { 20 | echo '
    '; 21 | 22 | genesis_widget_area( '${1:home-featured-left}', array( 23 | 'before' => '', 25 | ) ); 26 | 27 | genesis_widget_area( '${3:home-featured-right}', array( 28 | 'before' => '', 30 | ) ); 31 | 32 | echo '
    '; 33 | } 34 | 35 | } 36 | /* Sample CSS: 37 | 38 | .home-featured { 39 | margin-top: 40px; 40 | } 41 | 42 | @media only screen and (max-width: 800px) { 43 | 44 | .${1:home-featured-left} { 45 | margin-bottom: 40px; 46 | } 47 | 48 | } */ 49 | ]]>
    50 | 2-Column 33.333333333% (one-third) | 66.666666667% (two-thirds) widget areas 51 | source.php 52 |
    53 | -------------------------------------------------------------------------------- /snippets/two-column-66-33-widget-areas.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${1:home-featured-left}', 6 | 'name' => '${2:Home Featured Left}', 7 | 'description' => 'This is the ${2:Home Featured Left} section' 8 | ) ); 9 | genesis_register_sidebar( array( 10 | 'id' => '${3:home-featured-right}', 11 | 'name' => '${4:Home Featured Right}', 12 | 'description' => 'This is the ${4:Home Featured Right} section' 13 | ) ); 14 | 15 | // Display Home Featured Left and Home Featured Right widget areas in two third - one third columns below Header on Frontpage 16 | add_action( '${5:genesis_after_header}', '${6:sk_home_featured}' ); 17 | function ${6:sk_home_featured}() { 18 | 19 | if ( ${7:is_front_page()} ) { 20 | echo '
    '; 21 | 22 | genesis_widget_area( '${1:home-featured-left}', array( 23 | 'before' => '', 25 | ) ); 26 | 27 | genesis_widget_area( '${3:home-featured-right}', array( 28 | 'before' => '', 30 | ) ); 31 | 32 | echo '
    '; 33 | } 34 | 35 | } 36 | /* Sample CSS: 37 | 38 | .home-featured { 39 | margin-top: 40px; 40 | } 41 | 42 | @media only screen and (max-width: 800px) { 43 | 44 | .${1:home-featured-left} { 45 | margin-bottom: 40px; 46 | } 47 | 48 | } */ 49 | ]]>
    50 | 2-Column 66.666666667% (two-thirds) | 33.333333333% (one-third) widget areas 51 | source.php 52 |
    53 | -------------------------------------------------------------------------------- /snippets/three-column-widget-areas.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | '${1:home-featured-left}', 6 | 'name' => '${2:Home Featured Left}', 7 | 'description' => 'This is the ${2:Home Featured Left} section' 8 | ) ); 9 | genesis_register_sidebar( array( 10 | 'id' => '${3:home-featured-middle}', 11 | 'name' => '${4:Home Featured Middle}', 12 | 'description' => 'This is the ${4:Home Featured Middle} section' 13 | ) ); 14 | genesis_register_sidebar( array( 15 | 'id' => '${5:home-featured-right}', 16 | 'name' => '${6:Home Featured Right}', 17 | 'description' => 'This is the ${6:Home Featured Right} section' 18 | ) ); 19 | 20 | // Display ${2:Home Featured Left}, ${4:Home Featured Middle} and ${6:Home Featured Right} widget areas in one third columns below Header on Frontpage 21 | add_action( '${7:genesis_after_header}', '${8:sk_home_featured}' ); 22 | function ${8:sk_home_featured}() { 23 | 24 | if ( ${9:is_front_page()} ) { 25 | echo '
    '; 26 | 27 | genesis_widget_area( '${1:home-featured-left}', array( 28 | 'before' => '', 30 | ) ); 31 | 32 | genesis_widget_area( '${3:home-featured-middle}', array( 33 | 'before' => '', 35 | ) ); 36 | 37 | genesis_widget_area( '${5:home-featured-right}', array( 38 | 'before' => '', 40 | ) ); 41 | 42 | echo '
    '; 43 | } 44 | 45 | } 46 | /* Sample CSS: 47 | 48 | .${10:home-featured} { 49 | margin-top: 40px; 50 | } 51 | 52 | @media only screen and (max-width: 800px) { 53 | 54 | .${1:home-featured-left}, .${3:home-featured-middle} { 55 | margin-bottom: 40px; 56 | } 57 | 58 | } */ 59 | ]]>
    60 | 3-Column 33.333333333% (one-third) | 33.333333333% (one-third) | 33.333333333% (one-third) widget areas 61 | source.php 62 |
    63 | -------------------------------------------------------------------------------- /snippets/four-column-widget-areas.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 'home-featured-left', 6 | 'name' => 'Home Featured Left', 7 | 'description' => 'This is the Home Featured Left section' 8 | ) ); 9 | genesis_register_sidebar( array( 10 | 'id' => 'home-featured-middle-1', 11 | 'name' => 'Home Featured Middle 1', 12 | 'description' => 'This is the Home Featured Middle section' 13 | ) ); 14 | genesis_register_sidebar( array( 15 | 'id' => 'home-featured-middle-2', 16 | 'name' => 'Home Featured Middle 2', 17 | 'description' => 'This is the Home Featured Right section' 18 | ) ); 19 | genesis_register_sidebar( array( 20 | 'id' => 'home-featured-right', 21 | 'name' => 'Home Featured Right', 22 | 'description' => 'This is the Home Featured Right section' 23 | ) ); 24 | 25 | // Display Home Featured Left, Middle 1, Middle 2 and Right widget areas in one fourth columns below Header on Frontpage 26 | add_action( 'genesis_after_header', 'sk_home_featured' ); 27 | function sk_home_featured() { 28 | 29 | if ( is_front_page() ) { 30 | echo ''; 53 | } 54 | 55 | } 56 | /* Sample CSS: 57 | 58 | .home-featured { 59 | margin-top: 40px; 60 | } 61 | 62 | @media only screen and (max-width: 800px) { 63 | 64 | .home-featured .widget-area { 65 | margin-bottom: 40px; 66 | } 67 | .home-featured .widget-area:last-child { 68 | margin-bottom: 0; 69 | } 70 | 71 | } */ 72 | ]]> 73 | 4-Column 25% (one-fourth) | 25% (one-fourth) | 25% (one-fourth) | 25% (one-fourth) widget areas 74 | source.php 75 | 76 | -------------------------------------------------------------------------------- /snippets/custom-widget.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | __( '${3:A Foo Widget}', 'text_domain' ), ) // Args 18 | ); 19 | } 20 | 21 | /** 22 | * Front-end display of widget. 23 | * 24 | * @see WP_Widget::widget() 25 | * 26 | * @param array \$args Widget arguments. 27 | * @param array \$instance Saved values from database. 28 | */ 29 | public function widget( \$args, \$instance ) { 30 | echo \$args['before_widget']; 31 | if ( ! empty( \$instance['title'] ) ) { 32 | echo \$args['before_title'] . apply_filters( 'widget_title', \$instance['title'] ). \$args['after_title']; 33 | } 34 | ${4:echo __( 'Hello, World!', 'text_domain' );} 35 | echo \$args['after_widget']; 36 | } 37 | 38 | /** 39 | * Back-end widget form. 40 | * 41 | * @see WP_Widget::form() 42 | * 43 | * @param array \$instance Previously saved values from database. 44 | */ 45 | public function form( \$instance ) { 46 | \$title = ! empty( \$instance['title'] ) ? \$instance['title'] : __( '${5:New title}', 'text_domain' ); 47 | ?> 48 |

    49 | 50 | 51 |

    52 |
    80 | Sample code for creating a Custom Widget in WordPress 81 | source.php 82 |
    83 | --------------------------------------------------------------------------------