Skip to content

Commit

Permalink
refactored theme support
Browse files Browse the repository at this point in the history
  • Loading branch information
yankairalla committed Aug 25, 2021
1 parent 8c78da5 commit a9b1491
Showing 1 changed file with 43 additions and 33 deletions.
76 changes: 43 additions & 33 deletions inc/theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,55 @@ function haste_starter_theme_support() {
// All supports related a custom configuration
haste_starter_theme_custom();

// Add infinite scroll support.
add_theme_support(
'infinite-scroll',
array(
'type' => 'scroll',
'footer_widgets' => false,
'container' => 'content',
'wrapper' => false,
'render' => false,
'posts_per_page' => get_option( 'posts_per_page' ),
)
);

/**
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );

// Switch default core markup for search form, comment form, and comments to output valid HTML5.
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);

// All supports related to the project itself
haste_starter_theme_project();
} /* end theme support */
}

add_action( 'after_setup_theme', 'haste_starter_theme_support' );


/**
* All supports related to the project itself
*
* @return [type]
*/
function haste_starter_theme_project() {

// Add infinite scroll support.
add_theme_support(
'infinite-scroll',
array(
'type' => 'scroll',
'footer_widgets' => false,
'container' => 'content',
'wrapper' => false,
'render' => false,
'posts_per_page' => get_option( 'posts_per_page' ),
)
);

/**
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );

// Switch default core markup for search form, comment form, and comments to output valid HTML5.
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);
}

/**
* All supports related a custom configuration
*
Expand Down

0 comments on commit a9b1491

Please sign in to comment.