Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@ function underscoresme_get_contributors() {

return (array) $contributors;
}

function theme_name_enqueue_styles() {
wp_enqueue_style('theme-name-style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'theme_name_enqueue_styles');
3 changes: 3 additions & 0 deletions inc/generator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Create the custom full-width page template
$custom_page_template = "<?php\n/**\n * Template Name: Full-Width Page\n * Template Post Type: page\n *\n * @package $theme_name\n */\n\nget_header(); ?>\n<div id=\"primary\" class=\"content-area\">\n<main id=\"main\" class=\"site-main full-width\">\n<?php\nwhile ( have_posts() ) :\n the_post();\n get_template_part( 'template-parts/content', 'page' );\n if ( comments_open() || get_comments_number() ) {\n comments_template();\n }\nendwhile;\n?>\n</main>\n</div>\n<?php get_footer(); ?>";
file_put_contents( $theme_path . '/page-fullwidth.php', $custom_page_template );
29 changes: 29 additions & 0 deletions page-fullwidth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Template Name: Full-Width Page
* Template Post Type: page
*
* @package Theme_Name
*/

get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main full-width">
<?php
while (have_posts()) :
the_post();
get_template_part('template-parts/content', 'page');

// If comments are open or there's at least one comment, load the comment template.
if (comments_open() || get_comments_number()) {
comments_template();
}
endwhile;
?>
</main>
</div>

<?php
get_footer();
6 changes: 6 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,12 @@ img.size-full {
#content .gallery-columns-4 .gallery-item img {
}

/* Full-Width Template */
.full-width {
max-width: 100%;
padding: 0 20px;
}

/* Make sure embeds and iframes fit their containers */
embed,
iframe,
Expand Down