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);
?>


< ?php

if ( $format == 'quote' ) {
	//QUOTE POST FORMAT
  
  
  
?> 
< ?php the_content(); ?>
< ?php }elseif ( $format == 'aside' ) { //ASIDE POST FORMAT ?> < ?php }else { ?>
< ?php //ALL OTHER POST FORMATS $hide_thumbnail=( isset( $pexeto_page["hide_thumbnail"] )&&$pexeto_page["hide_thumbnail"] )?true:false; $thumb_class=''; if ( (!$format && !has_post_thumbnail($post->ID)) || $hide_thumbnail ) { $thumb_class=' no-thumbnail'; } ?> < ?php //PRINT HEADER OF POST DEPENDING ON ITS FORMAT if(!$format || $format=='video'){ $columns = isset($pexeto_page['columns']) ? $pexeto_page['columns'] : 1; $img_size = pexeto_get_image_size_options($columns, 'blog'); } if ( $format == 'gallery' ) { //PRINT A GALLERY locate_template( array( 'includes/slider-nivo-post-gallery.php' ), true, false ); }elseif ( $format == 'video' ) { ?>
< ?php $video_url = pexeto_get_single_meta( $post->ID, 'video' ); if ( $video_url ) { //pexeto_print_video( $video_url, $img_size['width'] ); ?> < ?php } ?>
< ?php }else { //PRINT AN IMAGE if ( has_post_thumbnail($post->ID) && !$hide_thumbnail ) { ?>
< ?php if ( !is_single() ) {?>< ?php } $thumb_id = get_post_thumbnail_id( $post->ID ); $thumb = wp_get_attachment_image_src( $thumb_id, 'full' ); $alt = get_post_meta($thumb_id, '_wp_attachment_image_alt', true); ?> < ?php echo esc_attr($alt); ?> < ?php if ( !is_single() ) { ?>< ?php } ?>
< ?php } } ?>
< ?php //PRINT POST INFO $hide_sections=pexeto_option( 'exclude_post_sections' ); $hide_date = in_array( 'date', $hide_sections ); $hide_author = in_array( 'author', $hide_sections ); ?>

< ?php echo get_the_title($post->ID); ?>

< ?php //PRINT THE CONTENT $excerpt=( isset( $pexeto_page['excerpt'] ) && $pexeto_page['excerpt'] ) ? true : false; if ( !$excerpt && pexeto_option( 'post_summary' )!='excerpt' || is_single() ) { if($format!=='gallery'){ the_content( '' ); }else{ //it is a gallery post format, strip the first gallery from the content if(!is_single()){ global $more; $more = 0; } $content = pexeto_remove_gallery_from_content(get_the_content('')); echo apply_filters('the_content', $content ); } ?>
< ?php if ( !is_single() ) { $ismore = @strpos( $post->post_content, ' Continue reading "Load Post with jQuery and sort them with buttons"

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 –



Centering you content in the middle of a DIV with CSS. Simple!

/* Internet Explorer 10 */
display:-ms-flexbox;
-ms-flex-pack:center;
-ms-flex-align:center;

/* Firefox */
display:-moz-box;
-moz-box-pack:center;
-moz-box-align:center;

/* Safari, Opera, and Chrome */
display:-webkit-box;
-webkit-box-pack:center;
-webkit-box-align:center;

/* W3C */
display:box;
box-pack:center;
box-align:center;

Gainesville FL Web Design, Graphic Design, Jquery and PHP database services!

Wp1stop.com is a full service programming boutique located in Gainesville, Fl. We specialize in highend development services and graphic design. JQuery, Javascrtipt databases, application design and WordPress development are our main areas of expertise.

There are other firms offering WordPress and development services. It’s important that you choose experts in the field and the best.
We can help make you are App a reality, whether you want your website to be mobile responsive and want it to work on all devices.

We can create a native app for you on Android or Iphone or work with Jquery mobile and Sencha Touch.

Give us a call and schedule a free consulation. You can reach me direct at 386-506-7930 and ask for Frederick.

Gainesville Web Development – WordPress Development

WordPress is now a widely used technology and our most recommended CMS platform. If you require Web Development in Gainesville Florida look no further and you will find us. Wp1stop offers excellent quality of service in WordPress development, if you dream it we can make it. We have been in WordPress development since the early beginnings of the software.