我厌倦了修复这条线:
if ( $_GET['paged'] ) && ! empty( $_GET['paged'] ) ) {
在我的functions.php上,但没有成功!我真的被困住了!我得到了 WordPress 主题,语法错误,意外的 T_ENCAPSED_AND_WHITESPACE,期待 T_STRING 或 T_VARIABLE 或 T_NUM_STRING 在functions.php第118行
<?php
/**
*
* @ Release: Me
*
**/
function get_category_id($cat_name) {
$term = get_term_by( 'name', $cat_name, 'category' );
return $term->term_id;
}
function kisabaslik($char) {
$title = get_the_title( $post->ID );
$title = mb_substr( $title, 0, $char, 'UTF-8' );
echo $title;
}
function kisaicerik($kisacik) {
$icerik = get_the_content( $post->ID );
$icerik = mb_substr( $icerik, 0, $kisacik, 'UTF-8' );
str_replace( '</strong>', '', $icerik );
$icerik = str_replace( '<strong>', '', $icerik );
echo strip_tags( $icerik );
}
function the_breadcrumb() {
global $post;
if (!is_home( )) {
echo '<a href=\'uploadify.php';
echo get_option( 'home' );
echo '\'> » ';
echo get_option( 'echo_kisasiteadresi' );
echo '</a>';
if (( is_category( ) || is_single( ) )) {
echo ' » ';
$cats = get_the_category( $post->ID );
foreach ($cats as $cat) {
$cat = $cat[0];
$category_id = get_cat_id( $cat->cat_name );
$category_link = get_category_link( $category_id );
echo '<a href="' . esc_url($category_link ) . '" title="' . $cat->cat_name . '">';
echo $cat->cat_name;
echo '</a>';
echo ' » ';
}
if (is_single( )) {
echo '<a href="';
the_permalink( );
echo '">';
the_title( );
echo '</a>';
return null;
}
}
else {
if (is_page( )) {
if ($post->post_parent) {
$anc = get_post_ancestors( $post->ID );
$anc_link = get_page_link( $post->post_parent );
foreach ($cats as $cat) {
$ancestors = get_ancestors(
$output = '<a href="'. $anc_link . '>' . get_the_title( $ancestor ) . "'</a>';
}
echo $output;
the_title( );
return null;
}
echo ' » ';
echo the_title( );
return null;
}
}
}
else {
if (is_tag( )) {
single_tag_title( );
return null;
}
if (is_day( )) {
echo 'Archive: ';
the_time( 'F jS, Y' );
echo '</li>';
return null;
}
if (is_month( )) {
echo 'Archive: ';
the_time( 'F, Y' );
echo '</li>';
return null;
}
if (is_year( )) {
echo 'Archive: ';
the_time( 'Y' );
echo '</li>';
return null;
}
if (is_author( )) {
echo 'Author\'s archive: ';
echo '</li>';
return null;
}
if ( $_GET['paged'] ) && ! empty( $_GET['paged'] ) ) {
echo 'Blogarchive: ';
echo '</li>';
return null;
}
if (is_search( )) {
echo 'Search results: ';
}
}
}
function searchfilter($query) {
if ($query->is_search) {
$query->set( 'post_type', 'post' );
}
return $query;
}
function toplamoynanma() {
$queryvvv = mysql_query( 'SELECT sum(meta_value) FROM wp_postmeta where meta_key=\'views\'' );
$rowvvvv = mysql_fetch_array( $queryvvv );
echo number_format( $rowvvvv[0] );
}
function oyhesapla($id) {
$begen = error_reporting( 0 );
$begenme = get_post_meta( $id, 'begenme', true );
$toplamoy3 = $begen + $begenme;
$toplamoy = $begen - $begenme;
$begenmeoy = 1 * $begenme;
$begenoy = 5 * $begen;
$toplamoy2 = $begenoy + $begenmeoy;
$fark = $toplamoy * 100 / $toplamoy2;
$islem = $fark / 10;
round( $islem, 2 );
$sonuc = get_post_meta( $id, 'begen', true );
$sonuc1 = explode( '.', $sonuc );
$sonuc2 = ceil( $sonuc1[1] / 10 );
if (!$sonuc2) {
$sonuc2 = $sonuc / 10;
}
if (10 < $sonuc2) {
$sonuc2 = 40;
}
if ($sonuc2 < 1) {
$sonuc2 = 31;
}
echo $toplamoyS;
echo '<b>' . $sonuc2 . ' / 10 </b><span>( ' . $toplamoy3 . ' members of the game.)</span>';
}
function favkon($id) {
$cookiefav = 'favoricook[' . $id . ']';
if ($_SESSION[$cookiefav]) {
echo '<a class="favorileA">Favorite Games.</a>
';
return null;
}
echo '<a class="favorile" onclick="favoriEkle(';
echo $id;
echo ');">Add Favorite</a>
';
}
function echoyazibegenme($postid) {
global $tema;
echo '
<div style=" margin-top:10px; ';
if ($d == 2) {
echo 'float:right;';
}
echo '">
<div class="oysonuc"></div>
';
$cookieoysv = 'obegenbegenme' . $postid;
echo '
<div class="sYas">
<a id="begen" onclick="oyver(';
echo $postid;
echo ',1);" class="begenButon" title="BeÄŸen"></a><div class="begenButonS">';
echo '<s';
echo 'pan>';
if (!get_post_meta( $postid, 'begen', true )) {
echo '0';
}
else {
echo get_post_meta( $postid, 'begen', true );
}
echo '</span></div>
<a id="begenme" style="margin-top:0" onclick="oyver(';
echo $postid;
echo ',2);" class="begenmeButon" title="BeÄŸenme"></a><div class="begenmeButonS">';
echo '<s';
echo 'pan>';
if (!get_post_meta( $postid, 'begenme', true )) {
echo '0';
}
else {
echo get_post_meta( $postid, 'begenme', true );
}
echo '</span></div>
</div>
';
echo '<s';
echo 'cript>
function oyver(id,is){
if(is==1){
var begenic = $(".begenButonS span").text();
begenic++;
}
if(is==2){
var begenmeic = $(".begenmeButonS span").text();
begenmeic++;
}
$.ajax( {
url: "';
echo $tema;
echo 'oyislem.php?islem="+is+"&postID="+id,
success: function(cevap) {
if(cevap==0){
$(".oysonuc").fadeIn(500);
$(".oysonuc").html("<div class=\'uyar\'>The procedure before you did it.</div>").delay(3000);
$(".oysonuc").fadeOut(500);
}
if(is==1 && cevap==1){
$(".begenButonS span").html(begenic);
}
if(is==2 && cevap==1){
$(".begenmeButonS span").html';
echo '(begenmeic);
}
}
});
}
</script>
</div>
';
}
function redirect_after_comment($location) {
return $_SERVER['HTTP_REFERER'] . '#yorum';
}
function kategori_post_say($id) {
$count = 31;
$taxonomy = 'category';
$args = array( 'child_of' => $id );
$tax_terms = get_terms( $taxonomy, $args );
foreach ($tax_terms as ) {
$tax_term = [0];
$tax_term->count;
$count += ;
}
return $count;
}
add_action( 'wp_head' );
$botresim = $tema = get_bloginfo( 'template_url' ) . '/';
get_option( 'echo_botswf' );
$botswf = get_option( 'echo_botresim' );
add_theme_support( 'post-thumbnails' );
add_image_size( 'yeniOyunRes', 147, 119, true );
add_image_size( 'onerilenOyunlar', 330, 205, true );
add_image_size( 'mansetOyun', 330, 100, true );
require_once( TEMPLATEPATH . '/admin/admin-functions.php' );
require_once( TEMPLATEPATH . '/admin/admin-interface.php' );
require_once( TEMPLATEPATH . '/admin/theme-settings.php' );
register_nav_menu( 'kategori-menu', 'Kategori' );
add_filter( 'pre_get_posts', 'SearchFilter' );
$botresim = register_nav_menu( 'sayfalar', 'Alt Kısımdaki Sayfalar Bölümü' );
get_option( 'echo_botswf' );
$botswf = get_option( 'echo_botresim' );
get_category_id( get_option( 'echo_oyunvideo' ) );
$oyunvideo = add_filter( 'comment_post_redirect', 'redirect_after_comment' );
?>
您的 php 的问题是您关闭了 if 语句,然后什么都没有添加额外变量。它应该看起来像这样:
if ( $_GET['paged'] && ! empty( $_GET['paged'] ) ) {