Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPress 3.0 Temalarında Özel Arka Plan Nasıl Etkinleştirilir

WordPress 3.0, WordPress temaları için özel arka planlar adı verilen yeni bir özellik sunuyor. Bu özellik kullanıcılara sitelerine özel arka planlar ekleyerek bloglarına/sitelerine benzersiz bir dokunuş kazandırma olanağı sağlayacaktır. Bu özellik çekirdeğe eklenmiş olsa da, yalnızca temanız destekliyorsa etkinleştirilecektir. Bu makalede, WordPress 3.0 için WordPress temalarında Özel Arka Planı nasıl etkinleştirebileceğinizi göstereceğiz.

Not: Bu makale özellikle tema tasarımcılarına yönelik orta seviye bir makaledir.

Güncelleme: add_custom_background videosunda kullanılan kod kaldırılmıştır. Bu makaledeki aşağıdaki koda bakın.

Video:

Metin-eğitici

Basitçe functions.php dosyanızı açın ve aşağıdaki satırı ekleyin:

add_theme_support('custom-background');

Ardından görünüm altında Özel arka planlar için bir seçenek görebilmeniz gerekir.

Custom Background in WordPress 3.0

WordPress 3.0 için varsayılan twenty ten temasında bu özellik zaten etkinleştirilmiştir.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

26 yorumLeave a Reply

  1. There seems to be a problem. Just as I select the image file and click upload, it refreshes the page with no result. The ‘color’ thing works. And, I have tried many browsers.

    Any help? Can we do it manually? As in, by some codes?

  2. What is the default size for wordpress backgrounds? i.e. what size should images be for them to fit properly in the background.

    • The best image is the one that can be repeated, so you keep the page load time small. WordPress will only show the background image that fits the screen resolution of the user.

      Admin

  3. Same situation here:
    Fatal error: Call to undefined function add_custom_background() in /mnt/data/www/sinya/aleksander.hu/i.aleksander.hu/wp-content/themes/stylize/functions.php on line 34

    what to do?
    haven’t upgrade yet to 3.0.0

  4. Hey I did what you said but i got this message

    Fatal error: Call to undefined function add_custom_background() in /home/patina/ilovepatina.com/wordpress/wp-content/themes/default/functions.php on line 2

    And now it won’t let me sign in at all to even go into the admin.
    Any advice? I need help bad…

  5. Hey… that was cool. After my first comment, I am taken to a different page with more information about your website and commenting… how did you make that happen? Plugin?
    I’d love to know more.

  6. It is important to note that for this to work within a theme, you must add the wp_head() after your theme stylesheet link in the theme header. This new function adds blocks with the added color/background from within the wp_head() section, and if you call your stylesheet after the wp_head(), your stylesheet will override the custom background function.

    I am torn, as I tend to call my stylesheet after the wp_head() call so that I can override styles added by plugins. May need to make a separate stylesheet for plugin overrides to be called later in the header.

  7. So how does WordPress know how to change the background? What if my current theme already has some background css attributes? Which one over-rides the other?

    • Your current theme would have to be made compatible with this feature. This is article is for theme designers who are creating themes and want to get WordPress 3.0 features in it. You would have to add the function for body class. If WordPress see that someone has updated the Custom Backgrounds page in the admin panel, then it will be prioritized. Otherwise the default background that you specify in the css file prevails.

      Admin

    • With the default function NO. For that you are better of using a plugin (several exist). The way this function works is it adds styling to the overall body class, so it will be the same for the entire site.

      Admin

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.