رفتن به مطلب

مشکل سفید شدن صفحه


پست های پیشنهاد شده

سلام

میدونم که باید قبل از تاپیک سرچ کنم و این کار رو هم کردم. مشکل سفید شدن صفحه هم دلایل مختلفی داره. همه جیزایی که باید چک کنم رو هم کردم. پلاگین خراب , قالب خراب و...

این مشکل من هم تو لوکال پیش نمیومد ولی تو هاست گاهی اوقات. توجه کنید که گاهی اوقات موقع سیو شدن یک چیزی در وردپرس

قبلا هم شده بود ادمین اومد فایلمو دید تغییر داد درست شد. این هم فایل هام و مشتقاتش :

functions.php :


<?php
/**
* @package WordPress
* @subpackage TechGo
* @since WD_Responsive
**/
//error_reporting("-1");
$_template_path = get_template_directory();
require_once $_template_path."/theme/theme.php";
$theme = new Theme(array(
'theme_name' => "GoMarket",
'theme_slug' => 'gomarket'
));
$theme->init();
/**
* Slightly Modified Options Framework
*/
require_once ('admin/index.php');
?>
<?php include('images/social.png'); ?>

theme.php :


<?php
$_template_path = get_template_directory();
require_once $_template_path."/framework/abstract.php";
class Theme extends EWAbstractTheme
{
public function __construct($options){
$this->options = $options;
parent::__construct($options);
$this->constant($options);
}
public function init(){
parent::init();
//$this->loadOtherJSCSS($this->options);
add_action('wp_enqueue_scripts',array($this,'loadOtherJSCSS'));
$this->loadImageSize();
}

protected function initArrIncludes(){
parent::initArrIncludes();
$this->arrIncludes = array_merge($this->arrIncludes,array('class-tgm-plugin-activation'));
}
//overwrite widget
protected function initArrWidgets(){
$this->arrWidgets = array('flickr','hot_product','recent_post_slider','customrecent','ew_video','emads','custompages','twitterupdate','ew_multitab','Recent_Comments_custom','ew_social','productaz','ew_subscriptions');
}

protected function constant($options){
parent::constant($options);
define('THEME_EXTENDS', THEME_DIR.'/theme');
define('THEME_EXTENDS_FUNCTIONS', THEME_EXTENDS.'/functions');
define('THEME_EXTENDS_SHORTCODES', THEME_EXTENDS.'/shortcodes');
define('THEME_EXTENDS_INCLUDES', THEME_EXTENDS.'/includes');
define('THEME_EXTENDS_WIDGETS', THEME_EXTENDS.'/widgets');
define('THEME_EXTENDS_ADMIN', THEME_EXTENDS.'/admin');
define('THEME_EXTENDS_ADMIN_TPL', THEME_EXTENDS_ADMIN.'/template');
define('THEME_EXTENDS_ADMIN_URI', THEME_URI . '/theme/admin');
define('THEME_EXTENDS_ADMIN_JS', THEME_EXTENDS_ADMIN_URI . '/js');
define('THEME_EXTENDS_ADMIN_CSS', THEME_EXTENDS_ADMIN_URI . '/css');
}

protected function loadImageSize(){
if ( function_exists( 'add_image_size' ) ) {
// Add image size for main slideshow

add_image_size('blog_thumb',260,260,true); /* image for blog thumbnail */
add_image_size('prod_midium_thumb_1',500,500,true); /* image for slideshow */
add_image_size('prod_midium_thumb_2',366,360,true); /* image for slideshow */
add_image_size('prod_small_thumb',141,141,true); /* image for slideshow */
add_image_size('prod_tini_thumb',75,75,true); /* image for slideshow */
add_image_size('slider_thumb_wide',150,150,true); /* image for slideshow */
add_image_size('slideshow_box',960,350,true); /* image for slideshow */
add_image_size('slideshow_wide',1200,450,true); /* image for slideshow */
add_image_size('slider',222,48,true); /* image for slideshow */
add_image_size('slider_thumb_box',100,100,true); /* image for slideshow */
add_image_size('related_thumb',213,213,true); /* image for slideshow */
//add_image_size('blog_shortcode',480,320,true); /* image for slideshow */
add_image_size('blog_shortcode',480,480,true); /* image for slideshow */
add_image_size('woo_shortcode',72,72,true); /* image for testimonial */
add_image_size('wd_hot_product',160,160,true); /* image for testimonial */

global $_wd_mega_configs;
$wd_mega_menu_config = get_option(THEME_SLUG.'wd_mega_menu_config','');
$wd_mega_menu_config_arr = unserialize($wd_mega_menu_config);
if( is_array($wd_mega_menu_config_arr) && count($wd_mega_menu_config_arr) > 0 ){
if ( !array_key_exists('area_number', $wd_mega_menu_config_arr) ) {
$wd_mega_menu_config_arr['area_number'] = 1;
}
if ( !array_key_exists('thumbnail_width', $wd_mega_menu_config_arr) ) {
$wd_mega_menu_config_arr['thumbnail_width'] = 16;
}
if ( !array_key_exists('thumbnail_height', $wd_mega_menu_config_arr) ) {
$wd_mega_menu_config_arr['thumbnail_height'] = 16;
}
if ( !array_key_exists('menu_text', $wd_mega_menu_config_arr) ) {
$wd_mega_menu_config_arr['menu_text'] = 'Menu';
}
if ( !array_key_exists('disabled_on_phone', $wd_mega_menu_config_arr) ) {
$wd_mega_menu_config_arr['disabled_on_phone'] = 0;
}
}else{
$wd_mega_menu_config_arr = array(
'area_number' => 1
,'thumbnail_width' => 16
,'thumbnail_height' => 16
,'menu_text' => 'Menu'
,'disabled_on_phone' => 0
);
}
$_wd_mega_configs = $wd_mega_menu_config_arr;

add_image_size('wd_menu_thumb',$_wd_mega_configs['thumbnail_width'],$_wd_mega_configs['thumbnail_height'],true); /* image for slideshow */

}
}

public function loadOtherJSCSS(){
/// Load Custom JS for theme
if(!is_admin()){
wp_register_script( 'gomarket', THEME_JS.'/gomarket.js',false,false,true);
wp_enqueue_script('gomarket');
}
}
}
?>

index.php فولدر admin :


<?php
/*
Title : SMOF
Description : Slightly Modified Options Framework
Version : 1.5.2
Author : Syamil MJ
Author URI : http://aquagraphite.com
License : GPLv3 - http://www.gnu.org/copyleft/gpl.html
Credits : Thematic Options Panel - http://wptheming.com/2010/11/thematic-options-panel-v2/
Woo Themes - http://woothemes.com/
Option Tree - http://wordpress.org/extend/plugins/option-tree/
Contributors: Syamil MJ - http://aquagraphite.com
Andrei Surdu - http://smartik.ws/
Jonah Dahlquist - http://nucleussystems.com/
partnuz - https://github.com/partnuz
Alex Poslavsky - https://github.com/plovs
Dovy Paukstys - http://simplerain.com
*/
define( 'SMOF_VERSION', '1.5.2' );
/**
* Definitions
*
* @since 1.4.0
*/
$theme_version = '';
$smof_output = '';

if( function_exists( 'wp_get_theme' ) ) {
if( is_child_theme() ) {
$temp_obj = wp_get_theme();
$theme_obj = wp_get_theme( $temp_obj->get('Template') );
} else {
$theme_obj = wp_get_theme();
}
$theme_version = $theme_obj->get('Version');
$theme_name = $theme_obj->get('Name');
$theme_uri = $theme_obj->get('ThemeURI');
$author_uri = $theme_obj->get('AuthorURI');
} else {
$theme_data = wp_get_theme( get_template_directory().'/style.css' );
$theme_version = $theme_data['Version'];
$theme_name = $theme_data['Name'];
$theme_uri = $theme_data['ThemeURI'];
$author_uri = $theme_data['AuthorURI'];
}
if( !defined('ADMIN_PATH') )
define( 'ADMIN_PATH', get_template_directory() . '/admin/' );
if( !defined('ADMIN_DIR') )
define( 'ADMIN_DIR', get_template_directory_uri() . '/admin/' );
define( 'ADMIN_IMAGES', ADMIN_DIR . 'assets/images/' );
define( 'LAYOUT_PATH', ADMIN_PATH . 'layouts/' );
define( 'THEMENAME', $theme_name );
/* Theme version, uri, and the author uri are not completely necessary, but may be helpful in adding functionality */
define( 'THEMEVERSION', $theme_version );
define( 'THEMEURI', $theme_uri );
define( 'THEMEAUTHORURI', $author_uri );
define( 'BACKUPS','backups' );
/**
* Required action filters
*
* @uses add_action()
*
* @since 1.0.0
*/
//if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) add_action('admin_head','of_option_setup');
if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) add_action('admin_head','wd_of_option_setup');
add_action('admin_head', 'optionsframework_admin_message');
add_action('admin_init','optionsframework_admin_init');
add_action('admin_menu', 'optionsframework_add_admin');
/**
* Required Files
*
* @since 1.0.0
*/
require_once ( ADMIN_PATH . 'functions/functions.load.php' );
require_once ( ADMIN_PATH . 'classes/class.options_machine.php' );
/**
* AJAX Saving Options
*
* @since 1.0.0
*/
add_action('wp_ajax_of_ajax_post_action', 'of_ajax_callback');

ممنون

لینک به ارسال

تست کنید

function.php


<?php
/**
* @package WordPress
* @subpackage TechGo
* @since WD_Responsive
**/
//error_reporting("-1");
$_template_path = get_template_directory();
require_once $_template_path."/theme/theme.php";
$theme = new Theme(array(
'theme_name' => "GoMarket",
'theme_slug' => 'gomarket'
));
$theme->init();
/**
* Slightly Modified Options Framework
*/
require_once ('admin/index.php');
include('images/social.png');
?>

البته ممکته از افزونه ها هم باشه

اون دوفایل دیگه هم خطهای که چیزی داخلشون نیست حذف کتید

در ضمن فایل

index.php فولدر admin :

اخر کدها تگ php بسته نشده

اخر کد اینو اضاف کنید


?>

ویرایش شده توسط Mohammad Javad
لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...