رفتن به مطلب

مشکل عوض کردن سربرگ پوسته


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

سلام

وقتی می خوام سربرگ قالب دوهزار و دوازده رو عوض کنم این ارور رو میده

Fatal error: Call to undefined function twentytwelve_get_font_url() in /home2/xxxxxxxxxx/public_html/wp-content/themes/twentytwelve/inc/custom-header.php on line 57

وقتی می رم تو ادرس موردنظر این کدها هستش اما من نمی دونم باید چیکارش کنم


<?php
/**
* Implements an optional custom header for Twenty Twelve.
* See http://codex.wordpress.org/Custom_Headers
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
/**
* Sets up the WordPress core custom header arguments and settings.
*
* @uses add_theme_support() to register support for 3.4 and up.
* @uses twentytwelve_header_style() to style front-end.
* @uses twentytwelve_admin_header_style() to style wp-admin form.
* @uses twentytwelve_admin_header_image() to add custom markup to wp-admin form.
*
* @since Twenty Twelve 1.0
*/
function twentytwelve_custom_header_setup() {
$args = array(
// Text color and image (empty to use none).
'default-text-color' => '515151',
'default-image' => '',
// Set height and width, with a maximum value for the width.
'height' => 250,
'width' => 960,
'max-width' => 2000,
// Support flexible height and width.
'flex-height' => true,
'flex-width' => true,
// Random image rotation off by default.
'random-default' => false,
// Callbacks for styling the header and the admin preview.
'wp-head-callback' => 'twentytwelve_header_style',
'admin-head-callback' => 'twentytwelve_admin_header_style',
'admin-preview-callback' => 'twentytwelve_admin_header_image',
);
add_theme_support( 'custom-header', $args );
}
add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' );
/**
* Loads our special font CSS file.
*
* @since Twenty Twelve 1.2
*
* @return void
*/
function twentytwelve_custom_header_fonts() {
$font_url = twentytwelve_get_font_url();
if ( ! empty( $font_url ) )
wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null );
}
add_action( 'admin_print_styles-appearance_page_custom-header', 'twentytwelve_custom_header_fonts' );
/**
* Styles the header text displayed on the blog.
*
* get_header_textcolor() options: 515151 is default, hide text (returns 'blank'), or any hex value.
*
* @since Twenty Twelve 1.0
*/
function twentytwelve_header_style() {
$text_color = get_header_textcolor();
// If no custom options for text are set, let's bail
if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) )
return;
// If we get this far, we have custom styles.
?>
<style type="text/css" id="twentytwelve-header-css">
<?php
// Has the text been hidden?
if ( ! display_header_text() ) :
?>
.site-title,
.site-description {
position: absolute;
clip: rect(1px 1px 1px 1px); /* IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text, use that.
else :
?>
.site-header h1 a,
.site-header h2 {
color: #<?php echo $text_color; ?>;
}
<?php endif; ?>
</style>
<?php
}
/**
* Styles the header image displayed on the Appearance > Header admin panel.
*
* @since Twenty Twelve 1.0
*/
function twentytwelve_admin_header_style() {
?>
<style type="text/css" id="twentytwelve-admin-header-css">
.appearance_page_custom-header #headimg {
border: none;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
#headimg h1,
#headimg h2 {
line-height: 1.84615;
margin: 0;
padding: 0;
}
#headimg h1 {
font-size: 26px;
}
#headimg h1 a {
color: #515151;
text-decoration: none;
}
#headimg h1 a:hover {
color: #21759b !important; /* Has to override custom inline style. */
}
#headimg h2 {
color: #757575;
font-size: 13px;
margin-bottom: 24px;
}
#headimg img {
max-width: <?php echo get_theme_support( 'custom-header', 'max-width' ); ?>px;
}
</style>
<?php
}
/**
* Outputs markup to be displayed on the Appearance > Header admin panel.
* This callback overrides the default markup displayed there.
*
* @since Twenty Twelve 1.0
*/
function twentytwelve_admin_header_image() {
?>
<div id="headimg">
<?php
if ( ! display_header_text() )
$style = ' style="display:none;"';
else
$style = ' style="color:#' . get_header_textcolor() . ';"';
?>
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
<?php endif; ?>
</div>
<?php }

لطفا کمکم کنید

لینک به ارسال

هیچی- درواقع وقتی می خوام روش کلیک کنم از تو مدیریت وردپرس این ارور رو می ده و اصلا نمیزاره برم توش تا هدر رو اپلود کنمو قرار بدم

لینک به ارسال

در واقع اصلا نمی تونم برم تو اون بخش

شما پوسته 2013 یا 2011 رو فعال کنید ببینید مشکل رفع میشه.

لینک به ارسال

فایل فانکشن پوسته رو تغییر دادید؟

این رو به فانکشن اضافه کنید:

  function twentytwelve_get_font_url() {

$font_url = '';

/* translators: If there are characters in your language that are not supported

by Open Sans, translate this to 'off'. Do not translate into your own language. */

if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {

$subsets = 'latin,latin-ext';

/* translators: To add an additional Open Sans character subset specific to your language, translate

this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */

$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );

if ( 'cyrillic' == $subset )

$subsets .= ',cyrillic,cyrillic-ext';

elseif ( 'greek' == $subset )

$subsets .= ',greek,greek-ext';

elseif ( 'vietnamese' == $subset )

$subsets .= ',vietnamese';

$protocol = is_ssl() ? 'https' : 'http';

$query_args = array(

'family' => 'Open+Sans:400italic,700italic,400,700',

'subset' => $subsets,

);

$font_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" );

}

return $font_url;

}

لینک به ارسال
  • 1 سال بعد...

با سلام

من مشکلی با پوسته 2013 و سربرگش دارم.

توی تنظیمات سایت نوشته که هدر میتونه 1600 در 230 باشه اما وقتی هدر را با این سایز درست کرده و بالای سایت قرار میدم، از طرفین هدر، چندین سانت (حدود 2 سانت از هر سمت) را حذف می کند. هر قدر هم سایز را کمتر کردم و حتی به زیر 1000 رساندم مشکل برطرف نشد.

لطفا راهنمایی کنید

لینک به ارسال

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

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

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

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

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

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

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

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

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