Skip to content

Instantly share code, notes, and snippets.

View ecommerce-functions.php
/**
* WooCommerce Extra Feature
* --------------------------
*
* Change number of related products on product page
* Set your own value for 'posts_per_page'
*
*/
function woo_related_products_limit() {
global $product;
View google-search-with-radio-buttons.html
<form method="get" action="http://www.google.com/search">
<div style="border:1px solid black;padding:4px;width:20em;">
<table border="0" align="center" cellpadding="0">
<tr><td>
<input type="text" name="q" size="25"
maxlength="255" value="" />
<input type="submit" value="Google Search" /></td></tr>
<tr><td align="center" style="font-size:75%">
<input type="radio" name="sitesearch" value="" />The Web
<input type="radio" name="sitesearch"
@Shininglow
Shininglow / extra.js
Created Aug 21, 2019
extra gutenberg block js
View extra.js
wp.blocks.registerBlockType('my_new-block', {
title: 'My Extra Block',
icon: 'heart',
category: 'common',
attributes: {
content: {type: 'string'}
},
edit: function(props) {
function somename(event) {
props.setAttributes({content: event.target.value})
@Shininglow
Shininglow / extra.php
Created Aug 13, 2019
For a new Gutenberg block
View extra.php
<?php
/**
*Plugin name: Extra
*Author: My name
*Version: 1.0.0
*/
function loadMyBlockFiles() {
wp_enqueue_script(
'my-test-text',
View responsive-blocks.css
@media (max-width: 764px) {
.wp-block-columns {
display: block;
}
}
View astra-footer.php
View astra-header.php
<?php
$done=false;
if ( function_exists( 'jet_theme_core') ) {
$done = jet_theme_core() ->do_location( 'header' );
}
?>
<?php
if ( ! $done ) {
astra_header();
}
View content-single.php
<header class="entry-header">
<?php $utility->attributes->get_title( array(
'class' => 'entry-title',
'html' => '<h3 %1$s>%4$s</h3>',
'echo' => true,
) );
?>
</header>
View content-page.php
<header class="entry-header">
<?php $utility->attributes->get_title( array(
'class' => 'entry-title screen-reader-text',
'html' => '<h1 %1$s>%4$s</h1>',
'echo' => true,
) );
?>
</header>
View style87.css
@font-face {
font-family: Font-name;
src: url(assets/fonts/font-name.ttf);
font-weight: normal;
}
You can’t perform that action at this time.