Giter VIP home page Giter VIP logo

genesis-hm's Introduction

genesis-hm

screenshot

  • Contributors: bobbingwide, vsgloik
  • Donate link: http://www.oik-plugins.com/oik/oik-donate/
  • Tags: genesis, image, one-column, two-columns, sidebars, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments
  • Requires at least: 5.0.3
  • Tested up to: 5.0.3
  • Version: 0.1.0
  • License: GPLv2 or later
  • License URI: http://www.gnu.org/licenses/gpl-2.0.html

Genesis Child Theme with image.php for Herb Miller

Description

genesis-hm is a child theme for the Genesis Theme Framework, implemented on herbmiller.me

  • Displays logo and blogname in the header
  • Menu in header widgets
  • Unused primary and secondary nav menus
  • Right Hand Sidebar
  • 4 footer widgets - using genesis-footer-widgets

Installation

  1. Purchase and Install the Genesis parent theme
  2. Download the genesis-hm child theme
  3. Install the genesis-hm child theme
  4. Activate the genesis-hm child theme
  5. Navigate to Appearance > Customize in your admin panel and customize to taste.
  6. Navigate to Genesis > Theme Settings to set other options
  7. Optionally, install and activate a range of oik-based plugins.

Change Log

0.1.0

  • Added: Add support for styling SVG icons created by bw_dash shortcode
  • Added: Support for WordPress 5.0 #10
  • Changed: Add margin-top to footer widgets
  • Changed: Add new line before 'on date', bobbingwide/uk-tides#5
  • Changed: Add styles for svg64 classs for [bw_dash] shortcode, and yellow background for textwidget p.warning
  • Changed: Change bw_tides formatting
  • Fixed: Fix nested list styling in widget area., #9
  • Fixed: Update logic for a simple editor colour palette #10

0.0.4

  • Fixed: Shortcodes not expanded in archive[ github bobbingwide genesis-hm issues 7]
  • Changed: Add image hovering with CSS transitions
  • Changed: Styling of list items in primary sidebar
  • Changed: Improve responsive display of Published | Last updated #8
  • Tested: With WordPress 4.7

0.0.3

  • Added: jQuery to enable drop down menu on iPad #4
  • Added: Disable caching of style.css when developing child theme styling #6
  • Changed: Improved the styling on the sites page. #5
  • Changed: Reduced padding in drop-down part of menu #4
  • Fixed: Categories and tags not being displayed #3

0.0.2

  • Added: Add post categories and tags
  • Changed: initial size of footer widgets
  • Fixed: Expand shortcodes in site titles #2

0.0.1

  • Fixed: Issue #1 - better responsive sidebars and menu colors

0.0.0

  • Add: First version for herbmiller.me

Copyright

genesis-hm (C) Copyright Bobbing Wide 2015-2019

  • This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

genesis-hm does not bundle third-party resources:

Notes

Dependent upon the Genesis Theme Framework. Benefits from genesis-footer-widgets and other oik plugins.

genesis-hm's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

genesis-hm's Issues

shortcodes not expanded in archive

Originally raised as "DIY shortcode not expanded in archive when post has no title"
this is now "shortcodes not expanded in archive".
image

Expected output

shortcodes are expected to be expanded

Actual output

  • oik shortcodes are not expanded
  • post_ related Genesis shortcodes appear to expand to nothing.
  • haven't tried all Genesis shortcodes and WordPress shortcodes

After a small change to ensure oik shortcodes are expanded the Actual output becomes

  • shortcodes appear to expand to nothing.

This happens because the Genesis function get_the_content_limit() strips the shortcodes from the content before counting words, and this function is called by genesis_do_post_content() when the display is not_singular() and the Genesis option 'content_archive_limit' is set.

Proposed solution

  • Apply the oik shortcode fix
  • Set the Genesis > Theme Settings Limit content to value to 0.

Improve styling of tables produced by [bw_plug]

Add the following CSS to custom.css.

table.bw_plug { }
.bw_plug td:nth-of-type( 1 ) { width: 50%; }
.bw_plug td:nth-of-type( 2 ) { width: 30%; text-align: center; vertical-align: middle; }
.bw_plug td:nth-of-type( 3 ) { width: 20%; text-align: right; vertical-align: middle;}
.bw_plug .links { width: 30%; text-align: center; vertical-align: middle;}
.bw_plug .vtdlut { width: 30%; text-align: right; vertical-align: middle; }

Note: This is in addition to changes to allow the table to scroll horizontally on narrow devices.

Expand shortcodes in site titles and breadcrumbs

If a shortcode is used in a page title then there are quite a few places in the generated HTML where it is not expanded. We have to allow for the Genesis theme framework and Yoast SEO ( WPSEO_Frontend ) which implement actions and filters that may appear to override our own logic,
ie. get the priorities right.

The solution developed for the theme could become part of the oik base plugin.

Improve the styling on the Sites page

The Sites page currently uses the following shortcodes to display and 'style' the links to other sites

[bw_images class=w25p2 titles=y captions=y]
[bw_css]
img.full { border: 1px dotted grey; }
[/bw_css]

This produces a simple display.
genesis-hm-issue-5-before

It would be nice if the styling could be improved without having to change the bw_images shortcode.

Drop down menu fairly unusable on tablet

On my iPad I can't choose a drop down menu item such as About > Online CV since it chooses the About item too quickly. Is it just me who is affected?

Additionally, the next level drop down menu is too large for many devices.

Disable caching of style.css when developing the child theme styling

For the oik base plugin's custom CSS file I recently changed the code so that, when WP_DEBUG is true, the ver parameter contains the timestamp of the CSS file.

I've been making updates to a number of Genesis child themes and found I needed to do the same sort of thing for them. The easiest solution was to add a few lines of code into functions.php

if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
	$timestamp = filemtime( get_stylesheet_directory() . "/style.css" );
	define( 'CHILD_THEME_VERSION', $timestamp );
} else { 
	define( 'CHILD_THEME_VERSION', '0.0.2' );
}

When Genesis enqueues the stylesheet it uses the CHILD_THEME_VERSION constant.
See http://genesis.wp-a2z.org/oik_api/genesis_load_stylesheet/

Categories and Tags are not being displayed

Even though c0f8249 suggested that post meta information would be included, with the post_meta customised by genesis_hm_post_meta_filter() nothing was being displayed since the action to display post meta had been removed by remove_action( 'genesis_entry_footer', 'genesis_post_meta' )

The offending line needs to be commented out/removed.
It seems the code had been copied & cobbled from a theme that didn't need the post meta information.

Categories widget styled incorrectly when shown as a tree

When viewing the Categories widget with Show post counts and Show hierarchy the indentation and highlighting is incorrect.

Actual output

image

Expected output

More accurate

image

Problem explanation

Custom CSS is to blame. This is OK for normal lists but not nested lists.

.sidebar-primary .widget ul li:nth-of-type( odd ) {
	background-color: #f5f5f5;
	margin: 3px 0;
}

The normal list in the side bar looks OK.
image

Problem solution

Improve responsive layouts

The Genesis framework's layout is OK for genesis-oik on an iPad in landscape and portrait mode but not good on genesis-hm. The styling needs to be improved in both the main content and the primary sidebar, so that when the sidebar drops below the main content both the main content and sidebar are given more width to play with.

Also check the colours of menu items at different sizes.

Update for Genesis 3.2.1

Similar to the other genesis child themes, update genesis-hm to be compatible with the latest version of the parent theme - genesis 3.2.1

Genesis parent theme update produces Notice which may break Gutenberg

In my development environment, with Gutenberg activated, I noted a Notice being issued
from theme update logic, when the active theme was genesis-hm, a new version of Genesis ( 2.6.0 ) was available for update, and cron was invoked.
At around the same time, I experienced an Unexpected error in Gutenberg.
The two problems may be related.
In this issue are the steps to reproduce the Notice, confirming that it's associated with the Genesis parent.

Actual output

Notice:  Undefined property: stdClass::$theme in C:\apache\htdocs\hm\wp-admin\includes\class-wp-automatic-updater.php on line 269

which may lead to WordPress editor fails due to the unexpected Notice being returned to the browser
when WP_DEBUG is true.

Expected output

No Notice issued. Editor does not fail.

Steps to reproduce

  1. Install Genesis v2.5.3
  2. Enable Check for updates
  3. Add some tracing logic to wp-admin\includes\class-wp-automatic-updater.php
case 'theme':
	$upgrader = new Theme_Upgrader( $skin );
	bw_trace2();
	$context  = get_theme_root( $item->theme );
	break;
  1. In an in situ PHPUnit test environment run the following PHP Unit test file
<?php
/**
 * @copyright Bobbing Wide 2018
 * @package play
 */
class Tests_wp_maybe_auto_update extends BW_UnitTestCase {

	/**
	 * wp-cron.php perform WordPress version checks and plugin and theme update checks
	 * We want to reproduce this message.
	 */
	function test_wp_maybe_auto_update() {
		wp_maybe_auto_update();
	}
}

The test case should should fail.

C:\apache\htdocs\wordpress\wp-content\plugins\play>pu tests\test-wp-maybe-auto-update.php
c:\apache\htdocs\phpLibraries\phpunit\phpunit-6.2.0.phar
#!/usr/bin/env php
Searching for wp-config.php in directories leading to: C:\apache\htdocs\wordpress\wp-content\plugins\play
Found wp-config.php in: C:\apache\htdocs/
Found wp-config.php in: C:\apache\htdocs\wordpress/
Domain: localhost

cli
End cli:oik_batch_loaded
cli

oik-wp running WordPress 4.9.4
C:\apache\htdocs\wordpress\wp-content\plugins\play
cli
Using wordpress-develop-tests plugin
PHPUnit 6.2.0 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.1.1 with Xdebug 2.5.4
Configuration: C:\apache\htdocs\wordpress\wp-content\plugins\play\phpunit.xml.dist

R                                                                   1 / 1 (100%)
Notice: Undefined property: stdClass::$theme in C:\apache\htdocs\wordpress\wp-admin\includes\class-wp-automatic-updater.php on line 270

Call Stack:
    0.0017     351952   1. {main}() C:\apache\htdocs\wordpress\wp-content\plugins\oik-batch\oik-phpunit.php:0
    0.0017     351952   2. oik_phpunit_loaded() C:\apache\htdocs\wordpress\wp-content\plugins\oik-batch\oik-phpunit.php:81
    0.0019     351952   3. oik_phpunit_run_phpunit() C:\apache\htdocs\wordpress\wp-content\plugins\oik-batch\oik-phpunit.php:30
    0.6410    3365760   4. PHPUnit\TextUI\Command::main() C:\apache\htdocs\wordpress\wp-content\plugins\oik-batch\oik-phpunit.php:75
    0.6411    3368920   5. PHPUnit\TextUI\Command->run() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/TextUI/Command.php:141
    4.9833   16968800   6. PHPUnit\TextUI\TestRunner->doRun() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/TextUI/Command.php:210
    5.1587   16976688   7. PHPUnit\Framework\TestSuite->run() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/TextUI/TestRunner.php:541
    5.1962   16961944   8. Tests_wp_maybe_auto_update->run() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/Framework/TestSuite.php:746
    5.1964   16961944   9. PHPUnit\Framework\TestResult->run() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/Framework/TestCase.php:883
    5.1970   16963128  10. Tests_wp_maybe_auto_update->runBare() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/Framework/TestResult.php:696
    7.6125   16322408  11. Tests_wp_maybe_auto_update->runTest() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/Framework/TestCase.php:928
    7.6126   16322704  12. ReflectionMethod->invokeArgs() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/Framework/TestCase.php:1069
    7.6126   16322712  13. Tests_wp_maybe_auto_update->test_wp_maybe_auto_update() phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-6.2.0.phar/phpunit/Framework/TestCase.php:1069
    7.6126   16322712  14. wp_maybe_auto_update() C:\apache\htdocs\wordpress\wp-content\plugins\play\tests\test-wp-maybe-auto-update.php:47
    7.6820   16458040  15. WP_Automatic_Updater->run() C:\apache\htdocs\wordpress\wp-includes\update.php:562
   14.9909   18303576  16. WP_Automatic_Updater->update() C:\apache\htdocs\wordpress\wp-admin\includes\class-wp-automatic-updater.php:401



Time: 32.32 seconds, Memory: 22.00MB

There was 1 risky test:

1) Tests_wp_maybe_auto_update::test_wp_maybe_auto_update
This test did not perform any assertions

OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 0, Risky: 1.
<!--PHP version:7.1.1
--><!--PHP functions:1335
--><!--User functions:3876
--><!--Classes:1002
--><!--Plugins:51
--><!--Files:909
--><!--Registered widgets:21
--><!--Post types:44
--><!--Taxonomies:24
--><!--Queries:57
--><!--Query time:0.24547672271729
--><!--Trace file:C:/apache/htdocs/wordpress/logs/bwtraces.cli.46

Relevant trace output

The trace output demonstrates that theme is part of the $item parameter for other themes ( e.g. TwentySixteen) but is missing from the Genesis theme's details.

wp-admin/includes/class-wp-automatic-updater.php(269:0) WP_Automatic_Updater::update(3) 54 2018-03-10T15:17:11+00:00 13.087396 0.008183 cf! 21 0 20971520/23068672 512M F=909 2 Array
(
    [0] => theme
    [1] => stdClass Object
        (
            [theme] => twentysixteen
            [new_version] => 1.4
            [url] => https://wordpress.org/themes/twentysixteen/
            [package] => https://downloads.wordpress.org/theme/twentysixteen.1.4.zip
        )

)

wp-admin/includes/class-wp-automatic-updater.php(269:0) WP_Automatic_Updater::update(4) 55 2018-03-10T15:17:11+00:00 13.096633 0.009237 cf! 21 0 20971520/23068672 512M F=909 2 Array
(
    [0] => theme
    [1] => stdClass Object
        (
            [new_version] => 2.6.0
            [url] => https://my.studiopress.com/themes/genesis
            [package] => https://www.genesistheme.com/download/?file=genesis.2.6.0.zip
            [changelog_url] => https://www.genesistheme.com/changelog/?TB_iframe=true
        )

)

Original stack trace

Original PHP Stack trace from the PHP errorlog.

09-Mar-2018 09:58:38 UTC] PHP Stack trace:
[09-Mar-2018 09:58:38 UTC] PHP   1. {main}() C:\apache\htdocs\hm\wp-cron.php:0
[09-Mar-2018 09:58:38 UTC] PHP   2. do_action_ref_array() C:\apache\htdocs\hm\wp-cron.php:126
[09-Mar-2018 09:58:38 UTC] PHP   3. WP_Hook->do_action() C:\apache\htdocs\hm\wp-includes\plugin.php:515
[09-Mar-2018 09:58:38 UTC] PHP   4. WP_Hook->apply_filters() C:\apache\htdocs\hm\wp-includes\class-wp-hook.php:310
[09-Mar-2018 09:58:38 UTC] PHP   5. wp_version_check() C:\apache\htdocs\hm\wp-includes\class-wp-hook.php:286
[09-Mar-2018 09:58:38 UTC] PHP   6. do_action() C:\apache\htdocs\hm\wp-includes\update.php:207
[09-Mar-2018 09:58:38 UTC] PHP   7. WP_Hook->do_action() C:\apache\htdocs\hm\wp-includes\plugin.php:453
[09-Mar-2018 09:58:38 UTC] PHP   8. WP_Hook->apply_filters() C:\apache\htdocs\hm\wp-includes\class-wp-hook.php:310
[09-Mar-2018 09:58:38 UTC] PHP   9. wp_maybe_auto_update() C:\apache\htdocs\hm\wp-includes\class-wp-hook.php:286
[09-Mar-2018 09:58:38 UTC] PHP  10. WP_Automatic_Updater->run() C:\apache\htdocs\hm\wp-includes\update.php:562
[09-Mar-2018 09:58:38 UTC] PHP  11. WP_Automatic_Updater->update() C:\apache\htdocs\hm\wp-admin\includes\class-wp-automatic-updater.php:400

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.