0
在我的投資組合頁面上,您可以點擊投資組合項目並彈出ajax容器。在這個容器中,你可以點擊一個按鈕來進入項目並閱讀更多細節。將投資組合項目指向單個項目並禁用ajax腳本wordpress主題
但
我想禁用此AJAX容器中,當你點擊它需要直來直去的項目項頁面上的所有細節的單品組合項目等
現在有我一直在搜索所有的.php文件和腳本,但當我點擊一個投資組合項目時,我無法找到該動作,而且我不確定在找到時需要替換它。我希望有人能幫助我。
這裏是投資組合頁面的代碼:
<div id="portfolio-grid" class="clearfix">
<?php
while ($portfolio_query->have_posts()) : $portfolio_query->the_post();
get_template_part('includes/entry', 'portfolio');
endwhile;
wp_reset_postdata();
?>
</div> <!-- end #portfolio-grid -->
這裏是阿賈克斯容器的代碼-I認爲 -
function et_show_ajax_project(){
global $wp_embed;
$project_id = (int) $_POST['et_project_id'];
$portfolio_args = array(
'post_type' => 'project',
'p' => $project_id
);
$portfolio_query = new WP_Query(apply_filters('et_ajax_portfolio_args', $portfolio_args));
while ($portfolio_query->have_posts()) : $portfolio_query->the_post();
global $post;
$width = apply_filters('et_ajax_media_width', 600);
$height = apply_filters('et_ajax_media_height', 480);
$media = get_post_meta($post->ID, '_et_used_images', true);
echo '<div class="et_media">';
if ($media){
echo '<div class="flexslider"><ul class="slides">';
foreach((array) $media as $et_media){
echo '<li class="slide">';
if (is_numeric($et_media)) {
$et_fullimage_array = wp_get_attachment_image_src($et_media, 'full');
if ($et_fullimage_array){
$et_fullimage = $et_fullimage_array[0];
echo '<img src="' . esc_url(et_new_thumb_resize(et_multisite_thumbnail($et_fullimage), $width, $height, '', true)) . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" />';
}
} else {
$video_embed = $wp_embed->shortcode('', $et_media);
$video_embed = preg_replace('/<embed /','<embed wmode="transparent" ',$video_embed);
$video_embed = preg_replace('/<\/object>/','<param name="wmode" value="transparent" /></object>',$video_embed);
$video_embed = preg_replace("/height=\"[0-9]*\"/", "height={$height}", $video_embed);
$video_embed = preg_replace("/width=\"[0-9]*\"/", "width={$width}", $video_embed);
echo $video_embed;
}
echo '</li>';
}
echo '</ul></div>';
} else {
$thumb = '';
$classtext = '';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Ajaximage');
$thumb = $thumbnail["thumb"];
echo '<a href="'. esc_url(get_permalink()) . '">';
print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext);
echo '</a>';
}
echo '</div> <!-- end .et_media -->';
echo '<div class="et_media_description">' .
'<h2 class="title">' . '<a href="' . get_permalink() . '">' . get_the_title() . '</a>' . '</h2>' .
truncate_post(560, false);
echo '</div> <!-- end .et_media_description -->';
echo '<a class="more" href="' . get_permalink() . '">' . __('Meer info »', 'Flexible') . '</a>';
endwhile;
wp_reset_postdata();
die();
}
你可以在這裏看到頁面: http://bit.ly/10BDVVf
再次謝謝你!
非常感謝!很好的幫助! –