Skip to content

Instantly share code, notes, and snippets.


Statsy Tepluypled

View GitHub Profile
View alt text
<img scr="/theme.png" alt="The Monstroid2" />
View google fonts
function myprefix_enqueue_google_fonts() {
wp_enqueue_style( 'Trade Winds', '' );
add_action( 'wp_enqueue_scripts', 'myprefix_enqueue_google_fonts' );
View wp_enqueue_style
function custom_add_google_fonts() {
wp_enqueue_style( 'custom-google-fonts', '', false );
add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' );
View Add to your .htaccess file
<IfModule mod_substitute.c>
SubstituteMaxLineLength 30m
LimitRequestBody 9999999
View Style for paragraph
body p {
background-color: #DAF7A6;
color: #340E6E;
font-family: Times-New-Roman;
text-align: center;
padding: 5px;
View Add code to .htaccess
<IfModule mod_substitute.c>
SubstituteMaxLineLength 30m
LimitRequestBody 9999999
View add_compatibility_elementor_page_templates
public function add_compatibility_elementor_page_templates() {
$page_templates_module = Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' );
add_filter( 'template_include', array( $page_templates_module, 'template_include' ), 100 );
View custom.php
function loadMyBlockFiles() {
plugin_dir_url(__FILE__). 'custom.js',
array('wp-blocks', 'wp-i18n', 'wp-editor'),
View custom.js
registerBlockType('namespace/block-slug', {
//built-in attributes
title: 'The name',
description: 'Block to generate a custom event',
icon: 'format-image',
category: 'layout'
//custom attributes
attributes: {