Remove Single Quotes from json_encode data PHP
$thecart = str_replace("'", "", json_encode($woocommerce->cart->get_cart(), JSON_HEX_APOS));
Reload Content in Masonry with jQuery append
jQuery('.leads').click(function(){ jQuery('.blogspace').html(''); var pagel = 1; var data = { action: 'my_getlatestleads', page: pagel, } jQuery.post(ajaxurl, data,function(response) { var mediaItemContainer = jQuery( '#blog-masonry' ); mediaItemContainer.masonry( { columnWidth: 200, itemSelector: '#post' } ); jQuery(mediaItemContainer ).prepend(response); jQuery( mediaItemContainer ).masonry( 'reloadItems' ); jQuery( mediaItemContainer ).masonry( 'layout' ); console.log('leads'); } );
Load Post with jQuery and sort them with buttons
Code to insert on a page I want… eCom A Competitive Edge More Leads Code to Insert in your function files add_action( ‘wp_ajax_my_getlatest’, ‘get_latestresults’ ); add_action(‘wp_ajax_nopriv_my_getlatest’, ‘get_latestresults’); function get_latestresults($sresult) { global $wpdb; wp_reset_postdata(); $args = array( ‘posts_per_page’ => 10 ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); $format = get_post_format($post->ID); ?> < [...]
Allow inner div scrolling and hide the scrollbars | CSS WordPress 101 Guide
.section:last-child { height:1500px !important; overflow:scroll ; overflow: -moz-scrollbars-none; } .section:last-child::-webkit-scrollbar { display: none; }
How to upload a file to Parse.com with Javascript | Parse.com
If you need to upload a file to parse.com - Use the following code -