Initial commit
This commit is contained in:
19
includes/front-end/custom_login_screen.php
Normal file
19
includes/front-end/custom_login_screen.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
// Change Login Page header url
|
||||
function ourHeaderUrl()
|
||||
{
|
||||
return esc_url(site_url('/'));
|
||||
}
|
||||
|
||||
// Make login title the name of our website
|
||||
function ourLoginTitle()
|
||||
{
|
||||
return get_bloginfo('name');
|
||||
}
|
||||
|
||||
// Enqueue out stylesheet for login screen
|
||||
function ourLoginCSS()
|
||||
{
|
||||
wp_enqueue_style('login styles', get_theme_file_uri('/assets/css/styles.css'));
|
||||
}
|
13
includes/front-end/registration_form_message.php
Normal file
13
includes/front-end/registration_form_message.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
// Change Registration Message
|
||||
function change_reg_message($message)
|
||||
{
|
||||
// change messages that contain 'Register'
|
||||
if (strpos($message, 'Register') !== FALSE) {
|
||||
$newMessage = "Register with " . get_bloginfo('name');
|
||||
return '<p class="message register">' . $newMessage . '</p>';
|
||||
} else {
|
||||
return $message;
|
||||
}
|
||||
}
|
23
includes/front-end/styles_and_scripts.php
Normal file
23
includes/front-end/styles_and_scripts.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// Enqueue styles and scripts
|
||||
function themeStarter_enqueue()
|
||||
{
|
||||
|
||||
/* Register and Enqueue Scripts */
|
||||
|
||||
wp_register_script('themeStarter-app', get_parent_theme_file_uri('/assets/js/index.js'), [], '1.0', true);
|
||||
wp_enqueue_script('themeStarter-app');
|
||||
|
||||
|
||||
/* Register and Enqueue Styles */
|
||||
|
||||
wp_register_style('themeStarter-styles', get_parent_theme_file_uri('/assets/css/styles.css'), [], '1.0', 'all');
|
||||
wp_enqueue_style('themeStarter-styles');
|
||||
|
||||
wp_register_style('bootstrap-icons', get_parent_theme_file_uri('/assets/css/bootstrap-icons.css'), [], '1.11.1', 'all');
|
||||
wp_enqueue_style('bootstrap-icons');
|
||||
|
||||
wp_register_style('font-awesome', get_parent_theme_file_uri('/assets/css/font-awesome.css'), [], '6.4.2', 'all');
|
||||
wp_enqueue_style('font-awesome');
|
||||
}
|
35
includes/front-end/technical_seo.php
Normal file
35
includes/front-end/technical_seo.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
function open_graph_twitter_card()
|
||||
{
|
||||
// Get the post or page ID
|
||||
$post_id = get_the_ID();
|
||||
|
||||
// Get the post or page title
|
||||
$title = get_the_title($post_id);
|
||||
|
||||
// Get the post or page excerpt (description)
|
||||
$description = (get_the_excerpt()) ? get_the_excerpt() : get_bloginfo('description');
|
||||
|
||||
// Get the post or page URL
|
||||
$url = get_permalink($post_id);
|
||||
|
||||
// Set default image url
|
||||
$default_image_url = get_theme_file_uri('/screenshot.png');
|
||||
|
||||
// Get the post thumbnail (featured image) URL
|
||||
$thumbnail = get_the_post_thumbnail_url($post_id);
|
||||
?>
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:title" content="<?php echo $title . ' - ' . get_bloginfo('name'); ?>" />
|
||||
<meta property="og:description" content="<?php echo $description ?>" />
|
||||
<meta property="og:url" content="<?php echo $url ?>" />
|
||||
<meta property="og:image" content="<?php echo $default_image_url ?>" />
|
||||
<!-- Twitter Card meta tags -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="<?php echo $title . ' - ' . get_bloginfo('name'); ?>" />
|
||||
<meta name="twitter:description" content="<?php echo $description ?>" />
|
||||
<meta name="twitter:image" content="<?php echo $default_image_url ?>" />
|
||||
<?php
|
||||
|
||||
}
|
84
includes/front-end/theme_starter_setup.php
Normal file
84
includes/front-end/theme_starter_setup.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
function themeStarter_setup()
|
||||
{
|
||||
|
||||
/*
|
||||
* Make theme available for translation.
|
||||
* Translations can be filed in the /languages/ directory.
|
||||
*/
|
||||
|
||||
load_theme_textdomain('themeStarter', get_template_directory() . '/languages');
|
||||
|
||||
// Add default posts and comments RSS feed links to head.
|
||||
add_theme_support('automatic-feed-links');
|
||||
|
||||
/*
|
||||
* Let WordPress manage the document title.
|
||||
*/
|
||||
add_theme_support('title-tag');
|
||||
|
||||
/*
|
||||
* Enable support for Post Thumbnails on posts and pages.
|
||||
*/
|
||||
add_theme_support('post-thumbnails');
|
||||
//Support custom logo
|
||||
add_theme_support('custom-logo');
|
||||
|
||||
// Add menus.
|
||||
register_nav_menus(
|
||||
array(
|
||||
'primary' => __('Primary Menu', 'themeStarter'),
|
||||
'secondary' => __('Secondary Menu', 'themeStarter'),
|
||||
)
|
||||
);
|
||||
|
||||
/*
|
||||
* 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',
|
||||
'style',
|
||||
'script'
|
||||
)
|
||||
);
|
||||
|
||||
/*
|
||||
* Enable support for Post Formats.
|
||||
*/
|
||||
|
||||
add_theme_support(
|
||||
'post-formats',
|
||||
array(
|
||||
'aside',
|
||||
'image',
|
||||
'video',
|
||||
'quote',
|
||||
'link',
|
||||
'gallery',
|
||||
'status',
|
||||
'audio',
|
||||
'chat'
|
||||
)
|
||||
);
|
||||
|
||||
/*
|
||||
* Enable support for Page excerpts.
|
||||
*/
|
||||
add_post_type_support('page', 'excerpt');
|
||||
}
|
||||
|
||||
function themeStarter_init()
|
||||
{
|
||||
// Use categories and tags with attachments
|
||||
register_taxonomy_for_object_type('category', 'attachment');
|
||||
register_taxonomy_for_object_type('post_tag', 'attachment');
|
||||
}
|
Reference in New Issue
Block a user