Skip to content

Instantly share code, notes, and snippets.

View proweb's full-sized avatar

Sergey Mochalov proweb

View GitHub Profile
@proweb
proweb / pattern-query-grid-cover-stack.html
Created December 22, 2023 13:18 — forked from justintadlock/pattern-query-grid-cover-stack.html
Query Loop pattern with stretched Stack block nested in Cover
<!-- wp:query {"queryId":0,"query":{"perPage":"7","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"parents":[]},"align":"full","className":"pattern-post-grid-cover","layout":{"type":"constrained"}} -->
<div class="wp-block-query alignfull pattern-post-grid-cover"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|plus-3","left":"var:preset|spacing|plus-3","top":"var(\u002d\u002dtheme-spacing\u002d\u002dplus-3)","bottom":"var(\u002d\u002dtheme-spacing\u002d\u002dplus-3)"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--theme-spacing--plus-3);padding-right:var(--wp--preset--spacing--plus-3);padding-bottom:var(--theme-spacing--plus-3);padding-left:var(--wp--preset--spacing--plus-3)"><!-- wp:post-template {"align":"full","style":{"spacing":{"blockGap":"var:preset|spacing|minus-3"}},"className":"is-style-no-gap is-style-flex-grow is-style-fe
@proweb
proweb / redirect-to-child.php
Created December 25, 2019 14:24 — forked from neverything/redirect-to-child.php
WordPress redirection page template to the first child page (menu_order) with WPML handling
<?php
/**
* Template Name: Redirect to child page
* Description: Redirects to the top child page
*
* @package PUT YOUR THEME NAME HERE :D
*/
global $post;
@proweb
proweb / gist:31f3c78ef08e4c86f1d10dbc6d352b21
Created May 19, 2017 14:13 — forked from dmitrymomot/gist:4654524
Получение в jquery get-параметра с url страницы
// получаем URL параметры
// var allVars = $.getUrlVars();
// получаем значение параметра по его имени
// var byName = $.getUrlVar('name');
$.extend({
getUrlVars: function(){
var vars = [], hash;