This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function idesign_customizer_config() { | |
$url = get_stylesheet_directory_uri() . '/inc/kirki/'; | |
/** | |
* If you need to include Kirki in your theme, | |
* then you may want to consider adding the translations here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Code Meta fields. | |
* | |
* @package My Theme | |
*/ | |
/** | |
* Register the post-type. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Polylang Shortcode - https://wordpress.org/plugins/polylang/ | |
* Add this code in your functions.php | |
* Put shortcode [polylang_langswitcher] to post/page for display flags | |
* | |
* @return string | |
*/ | |
function custom_polylang_langswitcher() { | |
$output = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BLOCK: my-block | |
* | |
* Registering a basic block with Gutenberg. | |
* Simple block, renders and saves the same content without any interactivity. | |
*/ | |
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* create a file acf-import.json inside your theme main folder | |
* use this code in themes functions.php or in any custom plugin. | |
* It is one time code so it will add all fields json entry inside acf-import.json file | |
*/ | |
add_action('init', 'create_fieldjson_from_fieldphp'); | |
function create_fieldjson_from_fieldphp() { | |
$groups = acf_get_local_field_groups(); | |
$json = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// General info | |
https://codex.wordpress.org/Theme_Development | |
// Core info | |
https://wp-learner.com/wotdpress-development/wordpress-core-files-and-functions/ | |
// Theme Handbook | |
https://developer.wordpress.org/themes/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Elementor get polylang translation of template | |
*/ | |
add_filter( 'elementor/theme/get_location_templates/template_id', function( $post_id ) { | |
if(!is_admin()){ | |
if ( function_exists( 'pll_get_post' ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Get Post Gallery Polyfill | |
* Plugin URI: https://prothemedesign.com | |
* Description: Make Get_Post_Gallery work for Gutenberg powered sites. | |
* Author: Ben Gillbanks | |
* Version: 1.0 | |
* Author URI: https://prothemedesign.com | |
* | |
* @package ptd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is an abbreviated "ES5" script (though it has some ES6 language, just not JSX, or dependencies on npm) | |
* demonstrating how to get the WordPress "Gutenberg" SelectControl to allow dynamic options. | |
* | |
* It probably isn't elegant, but neither am I...I included more context than may be necessary. | |
* | |
* (SelectControl pukes on dynamic options because it completely dies, never to be seen again, if it | |
* is sent an empty options array. This prevents that with a placeholder until your results come back.) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javascript libraries | |
Particles.js — A library for creating beautiful floating particles on a web page | |
Three.js — A library for creating 3d objects and spaces on a web page | |
Fullpage.js — Easy to implement full page scroll feature | |
Typed.js — Typewriter effect | |
Waypoints.js — Trigger a function when you scroll to an element |