Skip to content

Instantly share code, notes, and snippets.

<?php
function et_theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'et_theme_enqueue_styles' );
function et_my_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'Divi' ),
@Pavracer
Pavracer / gist:f76c5894580338d3c3ec478e4807b6f7
Last active November 3, 2017 21:04
Remoove post logo link
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.logo_container a').on("click", function (e) {
e.preventDefault();
});
});
</script>
@Pavracer
Pavracer / Change Logo.js
Last active November 3, 2017 20:39
Change Logo
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('body:not(.page-id-100) img#logo').attr('src', 'logo_link_goes_here');
});
</script>
@Pavracer
Pavracer / Logo_blank_link.js
Created November 4, 2017 13:44
Logo_blank_link
@Pavracer
Pavracer / change_read_more_post.js
Created November 5, 2017 16:35
change_read_more_post
<script type="text/javascript">
jQuery(document).ready( function() {
jQuery(".post-content a.more-link ").text('Text_goes_here');
} );
</script>
@Pavracer
Pavracer / copy_search_to_top.js
Created November 5, 2017 18:59
copy_search_to_top
<script>
jQuery( document ).ready(function() {
jQuery("ul.et-social-icons").append('<div id="et_top_search" ><span id="et_search_icon"></span></div>');
jQuery("ul.et-social-icons #et_search_icon").click(function(){jQuery('#main-header #et_top_search').trigger('click');});
});
</script>
@Pavracer
Pavracer / divi_social_icons_new_window.js
Created November 6, 2017 04:03
divi_social_icons_new_window
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("ul.et-social-icons a").attr('target', '_new');
});
</script>
<script type="text/javascript">
jQuery(function() {
jQuery('.logo_container a').click(function() {
jQuery('html, body').animate({
scrollTop: 0
}, 800);
});
});
</script>
@Pavracer
Pavracer / some_code.js
Created November 7, 2017 20:23
Some_code
<script>
jQuery( document ).ready(function() {
jQuery("ul.et-social-icons").append('<div id="et_top_search" ><span id="et_search_icon"></span></div>');
jQuery("ul.et-social-icons #et_search_icon").click(function(){jQuery('#main-header #et_top_search').trigger('click');});
});
</script>
@Pavracer
Pavracer / wrap_span.js
Created November 14, 2017 13:46
wrap_span
<script>
jQuery( document ).ready(function() {
jQuery(".custom_contact span.et_pb_contact_field_options_title").wrap('<a href="http://justelshopandtravel.com/wp-content/uploads/2017/11/Marinier.html" class="terms"></a>');
});
</script>