forked from thomaskarl/react-peterstenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added backend to the repo and some small fixes for safari on mobile
- Loading branch information
1 parent
2cdb6f5
commit 038b2f1
Showing
8 changed files
with
127 additions
and
2 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
backend/wp-content/themes/tws-wordpress-theme/functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
|
||
/** | ||
* Enqueue scripts | ||
*/ | ||
function twstudio_script_enqueue() { | ||
wp_enqueue_style( 'customstyle', get_template_directory_uri() . '/style.css', array(), '1.0.0' ); | ||
} | ||
add_action( 'wp_enqueue_scripts', 'twstudio_script_enqueue' ); | ||
|
||
|
||
|
||
/** | ||
* Add theme support | ||
*/ | ||
function twstudio_theme_setup() { | ||
add_theme_support( 'menus' ); | ||
add_theme_support( 'post-thumbnails' ); | ||
|
||
//Register menus | ||
register_nav_menu( 'main-menu', 'Main navigation' ); | ||
} | ||
add_action( 'init', 'twstudio_theme_setup' ); | ||
|
||
|
||
|
||
/** | ||
* Remove links from admin | ||
*/ | ||
function remove_menus() { | ||
// remove_menu_page( 'index.php' ); //Dashboard | ||
remove_menu_page( 'edit.php' ); //Posts | ||
// remove_menu_page( 'upload.php' ); //Media | ||
remove_menu_page( 'edit.php?post_type=page' ); //Pages | ||
remove_menu_page( 'edit-comments.php' ); //Comments | ||
remove_menu_page( 'themes.php' ); //Appearance | ||
// remove_menu_page( 'plugins.php' ); //Plugins | ||
remove_menu_page( 'users.php' ); //Users | ||
remove_menu_page( 'tools.php' ); //Tools | ||
} | ||
add_action( 'admin_menu', 'remove_menus' ); | ||
|
||
|
||
|
||
/** | ||
* Message in admin-footer | ||
*/ | ||
// Add you own text in admin footer | ||
function twstudio_footer_admin() { | ||
echo '<a href="https://www.thomasweb.studio/" target="_blank">thomasweb.studio 🐩</a>.'; | ||
} | ||
add_filter( 'admin_footer_text', 'twstudio_footer_admin' ); | ||
|
||
|
||
|
||
/** | ||
* Adds a option page in admin | ||
*/ | ||
if ( function_exists( 'acf_add_options_page' ) ) { | ||
acf_add_options_page(); | ||
} | ||
|
||
|
||
|
||
/** | ||
* Adds custom message to Admin | ||
*/ | ||
function twstudio_admin_notice() { | ||
?> | ||
<div class="notice"> | ||
<p>Click <a href="https://webmail.domeneshop.no/" target="_blank">here</a> to check your webmail.</p> | ||
</div> | ||
<?php | ||
} | ||
add_action( 'admin_notices', 'twstudio_admin_notice' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html <?php language_attributes(); ?>> | ||
<head> | ||
<meta charset="<?php bloginfo( 'charset' ); ?>"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/> | ||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=yes"/> | ||
|
||
<?php wp_head(); ?> | ||
</head> | ||
<body <?php body_class(); ?>> | ||
|
||
<div class="wrapper"> | ||
<p>You are at the wrong page</p> | ||
</div> | ||
|
||
<?php wp_footer(); ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php get_header(); ?> | ||
|
||
<div class="wrapper"> | ||
|
||
<?php the_content(); ?> | ||
|
||
</div> | ||
|
||
<?php get_footer(); ?> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@charset "UTF-8"; | ||
/*! | ||
Theme Name: TWS | ||
Theme URI: | ||
Author: Thomas Karl Andersson | ||
Author URI: http://thomasweb.studio/ | ||
Description: Simple and clean | ||
Version: 1.0 Alpha | ||
License: GNU General Public License v2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
Text Domain: twstudio | ||
Tags: Simple, clean | ||
This theme, like WordPress, is licensed under the GPL. | ||
Use it to make something cool, have fun, and share what you've learned with others. | ||
*/ | ||
*, body, html { | ||
-webkit-text-size-adjust: 100%; | ||
-ms-text-size-adjust: 100% | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters