• 19-07-2018, 23:26:39
    #1
    Merhaba ;

    Resim üzerine bir sitem var.Daha önceden yüklediğim tüm resimleri ayrı sayfada açmak istiyorum.Yani ziyaretçi geldiğinde 1 konuda 10 adet resim var diyelim her hangi birisine bastığında ayrı sayfa " ek sayfa " olarak açmasını nasıl sağlayabilirim ? Temada ne değiştirmem lazım bunun için veya bir eklentisi var mı ? Tek tek uğraşmak istemiyorum topluca yapmak istiyorum
  • 20-07-2018, 21:37:05
    #2
    Footer.php'de </body> etiketinden önce şunu yapıştırırsan en kısa yoldan halledebilirsin.

    <script type="text/javascript">
    $(document).ready(function(){
    $('img').attr('target','_blank');
    });
    </script>
  • 20-07-2018, 23:55:34
    #3
    orion35 adlı üyeden alıntı: mesajı görüntüle
    Footer.php'de </body> etiketinden önce şunu yapıştırırsan en kısa yoldan halledebilirsin.

    <script type="text/javascript">
    $(document).ready(function(){
    $('img').attr('target','_blank');
    });
    </script>
    Malesef bu şekilde de olmadı.Jannah 2 temasını kullanıyorum.
  • 21-07-2018, 00:02:48
    #4
    ertunc23 adlı üyeden alıntı: mesajı görüntüle
    Merhaba ;

    Resim üzerine bir sitem var.Daha önceden yüklediğim tüm resimleri ayrı sayfada açmak istiyorum.Yani ziyaretçi geldiğinde 1 konuda 10 adet resim var diyelim her hangi birisine bastığında ayrı sayfa " ek sayfa " olarak açmasını nasıl sağlayabilirim ? Temada ne değiştirmem lazım bunun için veya bir eklentisi var mı ? Tek tek uğraşmak istemiyorum topluca yapmak istiyorum
    single.php veya 404.php içeriğinizi yapıştırırsanız size özel bir şablon hazırlarım.
  • 21-07-2018, 00:08:25
    #5
    AdanaWeb adlı üyeden alıntı: mesajı görüntüle
    single.php veya 404.php içeriğinizi yapıştırırsanız size özel bir şablon hazırlarım.
    Single.php

    <?php
    /**
     * The template part for displaying single posts
     *
     */
    
    defined( 'ABSPATH' ) || exit; // Exit if accessed directly
    
    get_header(); ?>
    
    
    <?php
    
    if ( have_posts() ) :
    
        while ( have_posts()): the_post();
    
            TIELABS_HELPER::get_template_part( 'templates/single-post/content' );
    
        endwhile;
    
    endif;
    
    get_sidebar();
    get_footer();
    404.php

    <?php
    /**
     * The template for displaying 404 pages (not found)
     *
     */
    
    defined( 'ABSPATH' ) || exit; // Exit if accessed directly
    
    get_header(); ?>
    
        <div <?php tie_content_column_attr(); ?>>
    
            <div class="container-404">
    
                <?php
                    /**
                     * tie_before_404_content hook.
                     */
                    do_action( 'TieLabs/before_404_content' );
                ?>
    
                <h2><?php esc_html_e( '404 :(', TIELABS_TEXTDOMAIN ); ?></h2>
                <h3><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', TIELABS_TEXTDOMAIN ); ?></h3>
                <h4><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', TIELABS_TEXTDOMAIN ); ?></h4>
    
                <div id="content-404">
                    <?php get_search_form(); ?>
                </div><!-- #content-404 /-->
    
                <?php
                    if( has_nav_menu( '404-menu' ) ){
                        wp_nav_menu(
                            array(
                                'menu_id'        => 'menu-404',
                                'container_id'   => 'menu-404',
                                'theme_location' => '404-menu',
                                'depth'          => 1,
                            ));
                    }
                ?>
    
                <?php
                    /**
                     * tie_after_404_content hook.
                     */
                    do_action( 'TieLabs/after_404_content' );
                ?>
    
            </div><!-- .container-404 /-->
    
        </div><!-- .main-content /-->
    
    <?php get_footer(); ?>
  • 21-07-2018, 00:17:00
    #6
    single.php içeriğiniz templates/single-post/content bu klasörde ama bir deneyin bu şekilde.
    Öncelikle image.php ve attachment.php adında 2 dosya oluşturun ve içeriğini alttaki kodlar ile doldurun. Daha sonra tema klasörünüzün içine yükleyin. Ve resimlerinize tıklayın.

    <?php
     
    defined( 'ABSPATH' ) || exit; // Exit if accessed directly
     
    get_header(); ?>
     
        <div <?php tie_content_column_attr(); ?>>
     
      
    <?php next_image_link($size, '<div class="alignleft" style="
        margin-bottom: 10px;
        margin-left: 10px;
        width: 110px;
        height: 25px;
        background-color: #86761f;
        border-radius: 4px;
        line-height: 25px;
    font-size: 14px;
        border: 1px solid #7d743f;"><font color="#fff">  « Önceki Resim</font></div>' ); ?>
    
    
    
    
    <?php previous_image_link($size, '<div class="alignright"style="
        margin-bottom: 10px;
        margin-right: 10px;
        width: 110px;
        height: 25px;
        background-color: #86761f;
        border-radius: 4px;
        line-height: 25px;
    font-size: 14px;
        border: 1px solid #7d743f;
    "><font color="#fff"> Sonraki Resim »</font></div>' ); ?></br>
    
    <?php endif;?>
    
    
    </br><center><div class="entry-attachment">
    <?php
    // code copied from adjacent_image_link() in wp-include/media.php
    $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
    foreach ( $attachments as $k => $attachment )
      if ( $attachment->ID == $post->ID )
        break;
    
    $next_url =  isset($attachments[$k+1]) ? get_permalink($attachments[$k+1]->ID) : get_permalink($attachments[0]->ID);
    ?>
    
    <div class="attachment"><a href="<?php echo $next_url; ?>" title="<?php the_title(); ?>"><?php echo wp_get_attachment_image( $post->ID, 'large' );  ?></a></div>
    
    </div>
    
    
    </br>
    
    
    <p>Konuya Geri Dön: <a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo get_the_title($post->post_parent); ?></a></p></center>
    
        <?php endif; ?>
     
    <?php get_footer(); ?>
  • 21-07-2018, 00:27:42
    #7
    AdanaWeb adlı üyeden alıntı: mesajı görüntüle
    single.php içeriğiniz templates/single-post/content bu klasörde ama bir deneyin bu şekilde.
    Öncelikle image.php ve attachment.php adında 2 dosya oluşturun ve içeriğini alttaki kodlar ile doldurun. Daha sonra tema klasörünüzün içine yükleyin. Ve resimlerinize tıklayın.

    <?php
     
    defined( 'ABSPATH' ) || exit; // Exit if accessed directly
     
    get_header(); ?>
     
        <div <?php tie_content_column_attr(); ?>>
     
     
    <?php next_image_link($size, '<div class="alignleft" style="
        margin-bottom: 10px;
        margin-left: 10px;
        width: 110px;
        height: 25px;
        background-color: #86761f;
        border-radius: 4px;
        line-height: 25px;
    font-size: 14px;
        border: 1px solid #7d743f;"><font color="#fff">  « Önceki Resim</font></div>' ); ?>
    
    
    
    
    <?php previous_image_link($size, '<div class="alignright"style="
        margin-bottom: 10px;
        margin-right: 10px;
        width: 110px;
        height: 25px;
        background-color: #86761f;
        border-radius: 4px;
        line-height: 25px;
    font-size: 14px;
        border: 1px solid #7d743f;
    "><font color="#fff"> Sonraki Resim »</font></div>' ); ?></br>
    
    <?php endif;?>
    
    
    </br><center><div class="entry-attachment">
    <?php
    // code copied from adjacent_image_link() in wp-include/media.php
    $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
    foreach ( $attachments as $k => $attachment )
      if ( $attachment->ID == $post->ID )
        break;
    
    $next_url =  isset($attachments[$k+1]) ? get_permalink($attachments[$k+1]->ID) : get_permalink($attachments[0]->ID);
    ?>
    
    <div class="attachment"><a href="<?php echo $next_url; ?>" title="<?php the_title(); ?>"><?php echo wp_get_attachment_image( $post->ID, 'large' );  ?></a></div>
    
    </div>
    
    
    </br>
    
    
    <p>Konuya Geri Dön: <a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo get_the_title($post->post_parent); ?></a></p></center>
    
        <?php endif; ?>
     
    <?php get_footer(); ?>
    Olmadı hocam.Sanırım bu temada attachment kısmı kapalı.Başka bir arkadaş daha baktı bu gün ama çözemedi.
  • 21-07-2018, 00:30:28
    #8
    ertunc23 adlı üyeden alıntı: mesajı görüntüle
    Olmadı hocam.Sanırım bu temada attachment kısmı kapalı.Başka bir arkadaş daha baktı bu gün ama çözemedi.
    Olmayan nedir, öğrenebilir miyim? Site adresinizi de yazar mısınız?