将投资组合项指向单个项目并禁用ajax脚本wordpress主题


Direct a portfolio item to the single project and disable the ajax script wordpress theme

目前在我的投资组合页面上,您可以单击投资组合项目和ajax容器弹出。在这个容器中,你可以点击一个按钮进入项目并阅读更多细节。

,

我想禁用这个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 -->   

这里是Ajax容器的代码-我认为-

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 &raquo;', 'Flexible' ) . '</a>';
endwhile; 
wp_reset_postdata();
die();

}
你可以在这里看到页面:http://bit.ly/10BDVVf

再次感谢!

这是通过javascript在/wp-content/themes/Flexible/js/custom.js控制。注释掉第29-77行,它会像预期的那样链接(最后的return false取消了标准导航),但请记住,如果你直接编辑主题并升级它,你的更改将被覆盖。