Compare commits

..

No commits in common. "e6c111ace9ecacebba91bb2462f7b163b9a60157" and "0d83ea38a66164887b5099eacb3fab9065b54f2b" have entirely different histories.

10 changed files with 74 additions and 344 deletions

View File

@ -1,122 +0,0 @@
<?php
// MFWPT - archive.php
// function arl_kottke_archives GPL2.0, attribution below
?>
<?php
get_header();
if ( have_posts() ) while ( have_posts() ) : the_post();
?>
<secion class="archives">
<?php
// if it is the month or category link
if (is_month() || is_category()) {
?>
<h1 class="archive-search-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h1>
<div class="archive-excerpt"><?php the_excerpt(); ?></div>
<?php
// else it should be the original text
} else {
?>
<h1 class="archive-post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h1>
<div class="archive-content"><?php the_content(); ?></div>
<?php
} // if month or category
endwhile;
?>
<h2>Browse by date:</h2>
<?php arl_kottke_archives(); ?>
<h2>Browse by subject:</h2>
<ul class="archive-taxonomy"><?php wp_list_categories('title_li=');?></ul>
<h2>If all else fails, try searching for it&mdash;</h2>
<?php get_search_form(); ?>
</secion><!--archives-->
<?php
// endwhile; // end of the loop.
get_footer();
?>
<?php
/*
This function was originally a plugin, GPL2, information below:
Plugin Name: Kottke Style Archive
Version: 0.3
Plugin URI: http://www.lattimore.id.au/projects/wordpress/plugins/kottke-style-archives/
Author: Alistair Lattimore
Author URI: http://www.lattimore.id.au
Description: Displays an archive of posts in the same style to http://www.kottke.org/everfresh.
*/
function arl_kottke_archives($month_separator = ' ', $month_format = 'M')
{
global $wpdb;
$output = "";
$year = "";
$sql = "SELECT DATE_FORMAT(post_date, '%Y') AS Year, ";
$sql .= "DATE_FORMAT(post_date, '%m') AS Month ";
$sql .= "FROM $wpdb->posts ";
$sql .= "WHERE DATE_FORMAT(post_date, '%Y') <> '0000'";
$sql .= " AND post_status = 'publish'";
$sql .= " AND post_type = 'post' ";
$sql .= "GROUP BY DATE_FORMAT(post_date, '%Y'), DATE_FORMAT(post_date, '%m') ";
$sql .= "ORDER BY DATE_FORMAT(post_date, '%Y') DESC, DATE_FORMAT(post_date, '%m') ASC;";
$months = $wpdb->get_results($sql);
if (!empty($months))
{
foreach ($months as $month)
{
// Add in the year heading
if (($year == "") || ($year != $month->Year))
{
if (strlen($output))
{
$output .= "<br />\n<strong>" . $month->Year . ":</strong>&nbsp;";
}
else
{
$output .= "\n<strong>" . $month->Year . ":</strong>&nbsp;";
}
}
// Add in the monthly archive links
if ($year == $month->Year)
$output .= $month_separator;
$output .= '<a href="' . get_month_link($month->Year, $month->Month) . '">' . date($month_format, mktime(0, 0, 0, $month->Month, 1, $month->Year)) . '</a>';
$year = $month->Year;
}
}
else
{
$output = "<p>None available</p>\n";
}
print $output;
}
?>

View File

@ -1,10 +1,14 @@
<?php <?php
// MFWPT - single.php /**
* The template for displaying Comments.
// uses code from Wordpress Twenty_Thirteen *
?> * The area of the page that contains comments and the comment form.
*
<?php * @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
*/
/* /*
* If the current post is protected by a password and the visitor has not yet * If the current post is protected by a password and the visitor has not yet
* entered the password we will return early without loading the comments. * entered the password we will return early without loading the comments.
@ -13,10 +17,11 @@ if ( post_password_required() )
return; return;
?> ?>
<section class="comments-area"> <div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?> <?php if ( have_comments() ) : ?>
<h2 class="comments-title">Comments:</h2> <h2 class="comments-title">Comments:
</h2>
<div class="comment-list"> <div class="comment-list">
<?php <?php
@ -37,4 +42,4 @@ if ( post_password_required() )
<?php comment_form(); ?> <?php comment_form(); ?>
</section><!-- #comments-area --> </div><!-- #comments -->

View File

@ -1,14 +1,19 @@
<?php <?php
// MFWPT - content.php
// content.PHP
?> ?>
<article id="post-<?php the_ID(); ?>" > <div class="blog-post">
<h2 class="blog-post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2>
<p class="blog-post-meta"><?php the_date(); ?> by <?php the_author_link(); ?></p>
<?php the_content(); ?>
</div><!-- /.blog-post -->
<section <?php post_class(); ?>> <div class="blog-comments">
<h2 class="blog-post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2> <?php
<p class="blog-post-meta"><?php the_date(); ?> by <?php the_author_link(); ?></p> // If comments are open or we have at least one comment, load up the comment template.
<?php the_content(); ?> if ( comments_open() || get_comments_number() ) :
</section><!-- /.blog-post --> comments_template();
endif;
</article> ?>
</div> <!-- blog comments -->

View File

@ -1,20 +1,3 @@
<?php
// MFWPT - footer.php
?>
<hr>
<footer>
<p>this is a <a href="http://motherfuckingwebsite.com/">motherfucking website</a> and a <a href="http://bettermotherfuckingwebsite.com/">better motherfucking</a> website.</p>
<p><a href="https://code.jacobhaddon.com/Wordpress/mfwpt">Code</a> by Jacob Haddon - license <a href="https://www.gnu.org/licenses/gpl-2.0.en.html">GPLv2.0 or later</a> - <a href="https://Apokrupha.com">Apokrupha.com</a></p>
</footer>
<hr>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>
</html> </html>

View File

@ -1,8 +1,8 @@
<?php <?php
// MFWPT - functions.php
// function file for mfwpt
// to do: clean this up // enqueue the stye
function mytheme_enqueue_style() { function mytheme_enqueue_style() {
wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'style', get_stylesheet_uri() );
@ -13,59 +13,29 @@ add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_style' );
function register_my_menus() { function register_my_menus() {
register_nav_menus( register_nav_menus(
array( array(
'header-menu' => __( 'Header Menu' ), 'header-menu' => __( 'Header Menu' ),
'extra-menu' => __( 'Extra Menu' ) 'extra-menu' => __( 'Extra Menu' )
) )
); );
} // register_my_menus }
add_action( 'init', 'register_my_menus' ); add_action( 'init', 'register_my_menus' );
// remove unused word press features from header add_action( 'wp_enqueue_scripts', 'remove_actions_parent_theme');
function remove_actions_parent_theme() {
function remove_actions_from_theme() { remove_action('wp_head', 'rsd_link');
// this removes a lot of the extras added in to <HEAD> remove_action('wp_head', 'wp_generator');
// it also probably breaks a lot of things remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'index_rel_link');
// remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link');
// remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'feed_links_extra', 3);
// remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'start_post_rel_link', 10, 0);
// remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'parent_post_rel_link', 10, 0);
// remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
// remove_action('wp_head', 'feed_links_extra', 3);
// remove_action('wp_head', 'start_post_rel_link', 10, 0);
// remove_action('wp_head', 'parent_post_rel_link', 10, 0);
// remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
wp_dequeue_style( 'wp-block-library' ); wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' ); wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-block-style' ); wp_dequeue_style( 'wc-block-style' );
wp_dequeue_style( 'global-styles' ); } # remove_actions_parent_theme
wp_dequeue_style( 'classic-theme-styles' );
wp_dequeue_style('core-block-supports');
remove_action( 'wp_head', '_wp_render_title_tag', 1);
// remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
remove_action( 'wp_head', 'wp_resource_hints', 2);
remove_action( 'wp_head', 'feed_links', 2);
remove_action( 'wp_head', 'feed_links_extra', 3);
remove_action( 'wp_head', 'rsd_link');
remove_action( 'wp_head', 'wlwmanifest_link');
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action( 'wp_head', 'locale_stylesheet');
remove_action( 'wp_head', 'noindex', 1);
remove_action( 'wp_head', 'print_emoji_detection_script', 7);
//remove_action( 'wp_head', 'wp_print_styles', 8 );
remove_action( 'wp_head', 'wp_print_head_scripts', 9);
remove_action( 'wp_head', 'wp_generator');
remove_action( 'wp_head', 'rel_canonical');
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0);
remove_action( 'wp_head', 'wp_custom_css_cb', 101);
remove_action( 'wp_head', 'wp_site_icon', 99);
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
remove_action( 'wp_footer', 'wp_enqueue_global_styles', 1 );
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
} // remove_actions_parent_theme
add_action( 'wp_enqueue_scripts', 'remove_actions_from_theme');
function disable_emojis() { function disable_emojis() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
@ -77,11 +47,7 @@ function disable_emojis() {
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' ); add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 ); add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
} // disable_emojis }
add_action( 'init', 'disable_emojis' ); add_action( 'init', 'disable_emojis' );
add_action('wp_footer', function () {
wp_dequeue_style('core-block-supports');
});
?> ?>

View File

@ -1,36 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<?php
// MFWPT - header.php
?>
<html <?php language_attributes(); ?>> <html <?php language_attributes(); ?>>
<head> <head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta charset="<?php bloginfo( 'charset' ); ?>"> <title><?php wp_title(); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<title><?php bloginfo( 'name' ); ?></title> <?php wp_head(); ?>
</head>
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?> <body <?php body_class(); ?>>
<?php wp_head(); ?> <?php wp_nav_menu( array(
'theme_location' => 'header-menu',
</head> 'container_class' => 'mfwpt_menu'
) );?>
<body <?php body_class(); ?>>
<header>
<h1> <a href="<?php bloginfo( 'url' ); ?>"><?php bloginfo( 'name' ); ?></a> </h1>
<h2> <?php bloginfo( 'description' ); ?> </h2>
</header>
<!-- Nav -->
<?php
wp_nav_menu( array(
'theme_location' => 'header-menu',
'container' => 'nav',
'container_class' => 'mfwpt_menu'
) );
?>
<!-- Nav -->

View File

@ -1,31 +1,11 @@
<?php <?php
// MFWPT - index.php get_header();
// This is the index page, which presents the river, if ( have_posts() ) : while ( have_posts() ) : the_post();
// and is the default for any of the other views that get_template_part( 'content', get_post_format() );
// do not have specific php views endwhile;
?> else :
_e( 'Sorry, no posts matched your criteria.', 'textdomain' );
<?php get_header(); ?> endif;
//get_sidebar();
<main> get_footer();
?>
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
// get the content.php
get_template_part( 'content', get_post_format() );
endwhile;
else :
_e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif;
// pagenation for the pages
the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => "<-- ",
'next_text' => " -->"
) );
//get_sidebar();
?>
</main>
<?php get_footer(); ?>

View File

@ -1,30 +0,0 @@
<?php
// MFWPT - page.php
?>
<?php get_header(); ?>
<main>
<?php
// start the loop, check for posts
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php the_content(); ?>
</article><!-- page -->
<?php
endwhile;
else :
_e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif;
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</main>
<?php get_footer(); ?>

View File

@ -1,34 +0,0 @@
<?php
// MFWPT - single.php
?>
<?php get_header(); ?>
<main>
<?php
// start the loop, check for posts
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="blog-post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2>
<p class="blog-post-meta"><?php the_date(); ?> by <?php the_author_link(); ?></p>
<?php get_the_author_link(); ?>
<?php the_content(); ?>
</article><!-- blog post -->
<?php
endwhile;
else :
_e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif;
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</main>
<?php get_footer(); ?>

View File

@ -1,15 +1,15 @@
/* /*
Theme Name: Motherfucking Wordpress Theme Theme Name: Motherfucking Wordpress Theme
Theme URI: https://code.jacobhaddon.com/Wordpress/mfwpt Theme URI: https://jacobhaddon.com/mfwpt
Author: Jacob Haddon Author: Jacob Haddon
Author URI: https://jacobhaddon.com Author URI: https://jacobhaddon.com
Description: A no frills, fast loading Wordpress theme Description: A no frills, fast loading site that works.
Version: 1.0 Version: 1.0
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mfwpt Text Domain: mfwpt
Tags: Tags:
This theme, like WordPress, is licensed under the GPLv2.0. This theme, like WordPress, is licensed under the GPL.
This theme, like motherfuckingwebsite.com is satire This theme, like motherfuckingwebsite.com is satire
Use it to make something cool, have fun, and share what you've learned with others. Use it to make something cool, have fun, and share what you've learned with others.
*/ */