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
<script> | |
var buttons = document.querySelectorAll('.cwp_post_grid .et_pb_button_module_wrapper .et_pb_button'); | |
buttons.forEach((button) => { | |
button.innerHTML = "Change Button Text Here"; | |
return button; | |
}); |
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
@media screen and (max-width: 500px) { | |
.wp-block-gallery .blocks-gallery-item { | |
width: 100%!important; | |
margin-right: 0; | |
} | |
} |
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
function custom_paragraph_placeholder_for_pages() { | |
//Define your post types to lock for classic editor block. Default CPTs are 'post', 'page' | |
$post_type_object = get_post_type_object( 'page' ); | |
//Define what blocks you want to lock it for. Here is the list of core blocks: | |
//https://gist.github.com/munirkamal/0d443605a3273926051c2971d5f3ff84#file-core-blocks-txt | |
$post_type_object->template = array( | |
array( 'core/paragraph', array( | |
'placeholder' => 'my placeholder...', |
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
archives | |
audio | |
button | |
categories | |
code | |
column | |
columns | |
coverImage | |
embed | |
file |
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 my_custom_pt_link( $post_link, $id = 0 ){ | |
$post = get_post($id); | |
if ( is_object( $post ) ){ | |
$terms = wp_get_object_terms( $post->ID, ‘abc ); | |
if( $terms ){ | |
return str_replace( ‘%abc%’ , $terms[0]->slug , $post_link ); | |
} else { | |
return str_replace( ‘%abc%’ , 'misc' , $post_link ); | |
} |
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 | |
//This is just a dummy gist. | |
echo 'Hello World'; | |
?> |
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
<div id="content-carousel" class="content-carousel-widget" data-carousel="swiper"> | |
<!-- | |
You can use: data-items="5" for total items display in single page | |
data-autoplay="true" or "false" for autoplay. | |
data-loop="true" or "false" for looping the carousel | |
data-effect="fade" or "cube" for slide changing effects | |
data-direction="horizontal" or "vertical" for sliding direction | |
data-initlal="3" for for first active slide | |
data-center="true" or "false" for centerize slider | |
--> |
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 | |
Kirki::add_panel( 'test_panel', array( | |
'priority' => 10, | |
'title' => __( 'My Panel', 'start' ), | |
) ); | |
Kirki::add_section( 'test_section', array( | |
'title' => __( 'My Section', 'start' ), | |
'panel' => 'test_panel', | |
) ); |
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
// shortcode to show the module | |
function showmodule_shortcode($moduleid) { | |
extract(shortcode_atts(array('id' =>'*'),$moduleid)); | |
return do_shortcode('[et_pb_section global_module="'.$id.'"][/et_pb_section]'); | |
} | |
add_shortcode('showmodule', ‘showmodule_shortcode'); |
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
<script> | |
jQuery(document).ready(function( $ ) { | |
// This is to fix an annoying issue with using Before After image slider module within Tabs Module. | |
$(".et_pb_tabs_controls li").click(function(){setTimeout(function(){$(window).trigger("resize")},800)}) | |
}); | |
</script> |
NewerOlder