Die Texte werden ja per ajax.php angefordert und eingeblendet und da wird auch der Fehler liegen. Entweder weil die Texte bereits von der DB so eingelesen werden oder weil aus dem Eingelesenen der DOM neu aufgebaut wird.
im forntend sind die fehler zu sehen, im backend ist alles in ordnung. noch weitere ideen?
hier mal die ajax.php ich finde da einfach keine fehler was die schriften angeht.:
<?php
if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
header('Allow: POST');
header('HTTP/1.1 405 Method Not Allowed');
header('Content-Type: text/plain');
exit;
}
if(!(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'))) return;
require('../../../wp-config.php' );
nocache_headers();
global $am_option;
if(isset($_POST['ajx_page'])){
$slug = $_POST['ajx_page'];
query_posts('pagename='.$slug);
if(is_page_template('tpl-contact.php')){
get_template_part('templates/contact');
} else if(is_page_template('tpl-services.php')){
get_template_part('templates/services');
} else if(is_page_template('tpl-blog.php')){
$paged = ((int)$_POST['page_num'])?(int)$_POST['page_num']:1;
if($_POST['subpage']) {
query_posts('post_type=post&ignore_sticky_posts=1&posts_per_page=1&paged='.$paged);
$res = array();
ob_start();
include('templates/pager.php');
$res['pager'] = ob_get_clean();
ob_end_clean();
ob_start();
include('templates/blog-post.php');
$res['content'] = ob_get_clean();
ob_end_clean();
echo json_encode($res);
exit;
} else {
include('templates/blog.php');
}
} else if(is_page_template('tpl-portfolio.php')){
$paged = ((int)$_POST['page_num'])?(int)$_POST['page_num']:1;
if($_POST['subpage']) {
query_posts('post_type=portfolio&ignore_sticky_posts=1&posts_per_page=4&orderby=menu_order&order=ASC&paged='.$paged);
$res = array();
ob_start();
include('templates/pager.php');
$res['pager'] = ob_get_clean();
ob_end_clean();
ob_start();
include('templates/protfolio-post.php');
$res['content'] = ob_get_clean();
ob_end_clean();
echo json_encode($res);
exit;
} else {
include('templates/portfolio.php');
}
} else {
get_template_part('templates/common');
}
} else {
function buildBody($fields){
$body = array();
foreach($fields as $field=>$data) {
if(isset($_POST[$field]) && trim($_POST[$field]) && $data['label']) {
$body[] = $data['label'].": ".trim($_POST[$field]);
}
}
return implode("\n", $body);
}
function validEmail($email){
if(function_exists('filter_var')){
return filter_var($email, FILTER_VALIDATE_EMAIL);
} else {
return (preg_match("/[a-zA-Z0-9-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $email) > 0);
}
}
function getAdminEmail(){
global $am_option;
return $am_option['main']['email_addr_contact'];
}
function getAdminName(){
return str_replace("'", "'", get_bloginfo('name'));
}
function getHtmlEmail(){
return "text/html";
}
$res = array('error'=>array(), 'succ'=>array(), 'send'=>true);
$body = '';
$action = $_POST['action'];
$sendmail = false;
switch($action){
case 'ajax-contact-form':
$fields = array(
'c_name' => array('label'=>__('Name','am'), 'def'=>__('Name','am'), 'req'=>true),
'c_email' => array('label'=>__('Email','am'), 'def'=>__('Email','am'), 'req'=>true),
'c_mess' => array('label'=>__('Message','am'), 'def'=>__('Message','am'), 'req'=>true),
);
foreach($fields as $field=>$data){
if($fields[$field]['req'] && (!isset($_POST[$field]) || !trim($_POST[$field]) || $_POST[$field] == $fields[$field]['def'])) {
$res['error'][] = $field;
}
}
if(!in_array('c_email', $res['error']) && !validEmail(trim($_POST['c_email'])) ) {
$res['error'][] = 'c_email';
}
if(!count($res['error'])){
$res['succ'] = $fields;
unset($_SESSION['captcha_result']);
}
$body = buildBody($fields);
$addr = $am_option['main']['email_addr_contact'];
$subj = $am_option['main']['email_sbj_contact'];
$sendmail = true;
break;
}
if(!count($res['error']) && $action && $sendmail){
add_filter('wp_mail_from','getAdminEmail');
add_filter('wp_mail_from_name','getAdminName');
ob_start();
if(!wp_mail( $addr, $subj, $body)) $res['send'] = false;
ob_end_clean();
remove_filter( 'wp_mail_from', 'getAdminEmail' );
remove_filter( 'wp_mail_from_name', 'getAdminName' );
}
echo json_encode($res);
exit;
}
?>