Buyrun;
Ana dizinde
ekle.php şeklinde bir dosya oluşturup içine alttaki kodları atınız ve kaydediniz.
<?php
if (! isset($wp_did_header)):
if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) {
if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = '';
else $path = 'wp-admin/';
require_once( dirname(__FILE__) . '/wp-includes/classes.php');
require_once( dirname(__FILE__) . '/wp-includes/functions.php');
require_once( dirname(__FILE__) . '/wp-includes/plugin.php');
wp_die("wp-config.php dosyasinin olup olmadigini kontrol ediniz.");
}
$wp_did_header = true;
require_once( dirname(__FILE__) . '/wp-config.php');
wp();
gzip_compression();
require_once(ABSPATH . WPINC . '/template-loader.php');
$id=$_GET['id'];
query_posts('p='.$id.'');
endif;
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Markafem | Son Dakika Haberler</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="Pragma" content="no-cache" />
</head>
<body>
<?php if (have_posts()) : ?>
<?php $post = get_post($id);
$content = $post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
?>
<div style="background:url(http://www.markafem.com/dosyalar/images/ekle_markafem-logo.png);">
<div><img src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>" alt="<?php echo esc_textarea( strip_tags($post->post_title) ); ?>" style="width:560px; height:300px;"/></div>
<div style="font:bold 38px/47px Arial;color:#000;padding:10px 0;"><?php echo $post->post_title; ?></div>
<div style="font:14px/18px Arial;color:#000;padding:10px 0;"><?php echo $content; ?></div>
<div style="padding:7px 0;border-top:1px dashed #999;"></div>
<div style="font:12px/20px Arial;color:#666;"><strong>Eklenme tarihi : </strong><?php echo get_the_time('d.m.Y - H:i:s', $post->ID); ?><br /></div>
<div style="font:12px/20px Arial;color:#666"><strong>Kaynak : </strong><a href="<?php echo get_permalink($id); ?>" title="<?php echo esc_textarea( strip_tags($post->post_title) ); ?>"><?php echo $post->post_title; ?> | Markafem</a></div>
</div>
<?php else : ?>
<?php endif; // burda biter www.markafem.com ?>
</body>
</html>
+1.
require_once("wp-config.php"); veritabanı ve fonksiyonlara ulaşmak için yeterli hocam.