Skip to content

Instantly share code, notes, and snippets.

@mkrdip
mkrdip / single-project.php
Created November 24, 2014 20:01
Tweak Single Projects of Divi Theme to show post navigation in Divi Page Builder Posts
<?php
get_header();
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
?>
<div id="main-content">
@mkrdip
mkrdip / replace-value-jquery.js
Last active November 16, 2015 16:04
Replace values using jQuery
(function($){
$("#ID").text("Your Text");
$(".class").attr("placeholder", "New Value for Placeholder");
$(".class").attr("title", "New Value for Title");
})(jQuery);
@mkrdip
mkrdip / reorder-blog-divi.js
Created July 29, 2015 17:12
Reorder Post Title & Featured Image
jQuery(document).ready(function() {
jQuery('.et_pb_posts article > a').each(function() {
jQuery(this).insertAfter(jQuery(this).siblings('.post-meta'));
});
});
<script type-"text/javascript">
jQuery(document).ready(function() {
jQuery('.et_pb_blog_grid article > .et_pb_image_container).each(function() {
jQuery(this).appendTo(jQuery(this).parent());
});
</script>
@mkrdip
mkrdip / resize-divi-fullwidth-slider.css
Created August 1, 2015 19:11
Resize Divi Full Width Slider on Mobile & Tablet
@media screen and (max-width:900px)
{
.et_pb_fullwidth_slider_0 .et_pb_slide {
background-size: contain!important;
height: 250px !important;
}
}
@media screen and (max-width:479px)
div#top-header.et-fixed-header {
display: none !important;
}
header#main-header.et-fixed-header {
margin-top: -39px !important;
}
/* Please edit the slider module and add a custom css id ukpt_slider to it. Add the following code to your css. Change the height as appropriate to match your content. */
@media only screen and (min-width: 1024px) {
#ukpt_slider, #ukpt_slider .et_pb_slides,
#ukpt_slider .et_pb_slides .et_pb_slide,
#ukpt_slider .et_pb_slides .et_pb_slide .et_pb_container {
height: 450px;
}
#ukpt_slider .et_pb_slides .et_pb_slide .et_pb_container {
display: table;
.et_boxed_layout #page-container, .et_fixed_nav.et_boxed_layout #page-container #top-header, .et_fixed_nav.et_boxed_layout #page-container #main-header, .et_boxed_layout #page-container .container, .et_boxed_layout #page-container .et_pb_row {
max-width: 960px !important;
}
@media only screen and ( min-width:980px ) {
#et_mobile_nav_menu { display: block }
#top-menu { display: none;}
}
/* Wrong codes here: http://www.divithemeexamples.com/show-divi-mobile-menu-on-desktops/ */
<script type="text/javascript">
(function($){
$(".class-name a").attr("href", "http://www.mkrdip.me");
})(jQuery)
</script>