(function($) {
$('#showmemore').on('click', 'a', function(e){
e.preventDefault();
$(this).addClass('loading').text('Loading...');
$.ajax({
type: "GET",
url: $(this).attr('href') + '#loop',
dataType: "html",
success: function(out){
result = $(out).find('#loop .post');
nextlink = $(out).find('#showmemore a').attr('href');
$('#loop').append(result.fadeIn(300));
$('#showmemore a').removeClass('loading').html('<span class="plus">+</span>Show Me More Lyrics');
$('#showmemore a').attr('href', nextlink);
var data_ = $(out);
data_.each(function () {
if ($(this).hasClass('artist')) {
if (!$(this).find('img').length) {
$Artist.get($('[data-container="artist"]' )); // здесь я пробую вызвать объект, который вы мне написали http://toster.ru/q/123675#comment_443183
}
}
});
}
});
});
})(jQuery)
(function($) {
$('#showmemore a').live('click', function(e){
e.preventDefault();
$(this).addClass('loading').text('LOADING...');
$.ajax({
type: "GET",
url: $(this).attr('href') + '#loop',
dataType: "html",
success: function(out){
result = $(out).find('#loop .post');
nextlink = $(out).find('#showmemore a').attr('href');
$('#loop').append(result.fadeIn(300));
$('#showmemore a').removeClass('loading').html('Show me more');
$('#showmemore a').attr('href', nextlink);
}
});
});
})(jQuery)
<?php
while ($my_albums->have_posts()) : $my_albums->the_post();
// do more stuff with other loops
endwhile; if($my_albums->get('paged') != $my_albums->max_num_pages) { ?>
<div id="showmemore"><?php next_posts_link('Show Me More') ?></div>
<?php } else { ?>
<style>#showmemore{display:none;}</style>
<?php }?>
add_filter( 'posts_where', 'title_like_posts_where', 10, 2 );
function title_like_posts_where( $where, &$wp_query ) {
global $wpdb;
if ( $post_title_like = $wp_query->get( 'post_title_like' ) ) {
$where .= ' AND ' . $wpdb->posts . '.post_title LIKE \'' . esc_sql( like_escape( $post_title_like ) ) . '%\'';
}
return $where;
};