Skip to content

Instantly share code, notes, and snippets.

View webmandesign's full-sized avatar
👋
Creating inclusive WordPress themes

Oliver Juhas webmandesign

👋
Creating inclusive WordPress themes
View GitHub Profile
@webmandesign
webmandesign / test-content.html
Last active March 16, 2022 06:21
WP5.9 issue test content
<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size"><strong>This text uses "Large" font size. It should be the same size as the text in next column. Is it?</strong><br>Some more dummy text here... Lorem ipsum dolor sit amet pede tincidunt pulvinar penatibus rutrum. Platea egestas feugiat placerat id inceptos consectetur cubilia laoreet. Platea iaculis placerat montes taciti ipsum ex.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:html -->
<p class="has-theme-large-font-size"><strong>This is how theme defines "Large" font size. The text in previous column should be the same size as this one. Is it?</strong><br>Some more dummy text here... Lorem ipsum dolor sit amet pede tincidunt pulvinar penatibus rutrum. Platea egestas feugiat placerat id inceptos consectetur cubilia laoreet. Platea iaculis placerat mo
@webmandesign
webmandesign / functions.php
Last active November 2, 2022 10:17
WordPress 6.1.0 sub-menu issue fix
<?php
/**
* Put this code (without the "<?php" above) into your child theme's "functions.php" file.
* Use this only to fix sub-menu issue in WordPress 6.1.0.
* Tip: Check https://support.webmandesign.eu/child-theme/ for more info on child themes.
*/
add_filter( 'wp_nav_menu_args', function( $args ) {
$args['depth'] = 0;
return $args;
} );
@webmandesign
webmandesign / emiear-clients-galler.html
Created March 8, 2023 20:14
Eimear Clients page Gallery block
<!-- wp:gallery {"columns":4,"linkTo":"none","align":"wide"} -->
<figure class="wp-block-gallery alignwide has-nested-images columns-4 is-cropped"><!-- wp:image {"id":482,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://themedemos.webmandesign.eu/eimear/wp-content/uploads/sites/27/WMDEMO__logo-9.jpg" alt="Don't forget to set alt text." class="wp-image-482"/></figure>
<!-- /wp:image -->
<!-- wp:image {"id":481,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://themedemos.webmandesign.eu/eimear/wp-content/uploads/sites/27/WMDEMO__logo-8.jpg" alt="Don't forget to set alt text." class="wp-image-481"/></figure>
<!-- /wp:image -->
<!-- wp:image {"id":480,"sizeSlug":"large","linkDestination":"none"} -->
@webmandesign
webmandesign / Modern--Project-content--Custom-intro-setup.html
Created May 9, 2023 14:08
Modern theme: Project content: "Custom intro setup"
<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eget libero sit amet eros sagittis iaculis sed in est. Nulla porttitor tortor quis sem iaculis, nec elementum ante fermentum.</p>
<!-- /wp:paragraph -->
<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->
<!-- wp:list -->
<ul><!-- wp:list-item {"className":"icon-bullet genericons-neue genericons-neue-star"} -->
@webmandesign
webmandesign / page-content-cart.html
Created August 23, 2023 14:04
Page content: Cart with block theme
<!-- wp:woocommerce/cart -->
<div class="wp-block-woocommerce-cart alignwide is-loading">
<!-- wp:woocommerce/filled-cart-block {"align":"wide"} -->
<div class="wp-block-woocommerce-filled-cart-block alignwide">
<!-- wp:woocommerce/cart-items-block -->
<div class="wp-block-woocommerce-cart-items-block">
<!-- wp:woocommerce/cart-line-items-block -->
<div class="wp-block-woocommerce-cart-line-items-block"></div>
<!-- /wp:woocommerce/cart-line-items-block -->
@webmandesign
webmandesign / page-content-cart-classic-theme.html
Created August 23, 2023 14:21
Page content: Cart with classic/hybrid theme
<!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide">
<!-- wp:shortcode -->[woocommerce_cart]<!-- /wp:shortcode -->
</div>
<!-- /wp:group -->
@webmandesign
webmandesign / webman-subnav-widget.php
Created October 23, 2023 11:56
WebMan Sub Navigation Widget plugin
<?php if ( ! defined( 'WPINC' ) ) exit;
/**
* Plugin Name: WebMan Sub Navigation Widget
* Description: Extraction and modification of code from WebMan Amplifier plugin.
* Version: 1.0.0
* Author: WebMan Design - Oliver Juhas
* Author URI: https://www.webmandesign.eu
* License: GNU General Public License v3
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@webmandesign
webmandesign / elementor-template.php
Created January 31, 2024 16:48
Elementor template shortcode
<?php
add_shortcode(
'elementor-template',
function( array $atts ): string {
if (
empty( $atts['id'] )
|| ! is_callable( '\Elementor\Plugin::instance' )
) {
@webmandesign
webmandesign / gwyneth-chess-pattern.html
Created March 13, 2024 16:07
Gwyneth chess pattern
<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0"},"blockGap":{"top":"0","left":"0"},"padding":{"top":"var:preset|spacing|content","bottom":"var:preset|spacing|content"}}},"backgroundColor":"primary","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0;padding-top:var(--wp--preset--spacing--content);padding-bottom:var(--wp--preset--spacing--content)"><!-- wp:heading {"className":"is-style-screen-reader-text"} -->
<h2 class="wp-block-heading is-style-screen-reader-text">This is title</h2>
<!-- /wp:heading -->
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0","left":"0"}}}} -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:media-text {"mediaId":987654321,"mediaLink":"#0","mediaType":"image","imageFill":true,"style":{"border":{"radius":{"topLeft":"3rem","topRight":"3rem","bottomLeft":"0rem","bottomRight":"0rem"},"width":"2px"}},"backgroundColor":"primary"} -->
<d