No Result
View All Result
الأربعاء, نوفمبر 20, 2019
English
  • الرئيسية
  • عن المعهد
    • رؤيا ورسالة واهداف
    • هيكلية المعهد
    • لوحة الاعلانات
    • ادارة الموقع
  • اقسام المعهد
    • الاقسام الطبية
      • قسم التحليلات المرضية
      • قسم التمريض
      • قسم صحة المجتمع
    • الاقسام الادارية
      • قسم انظمة الحاسوب
      • قسم المحاسبة
      • قسم تقنيات ادارة المواد
      • قسم الادارة القانونية
    • الاقسام التكنلوجية
      • قسم المدني
      • قسم التقنيات الالكترونية
      • قسم المساحة
      • قسم ميكانيك القدرة
      • قسم التقنيات الميكانيكية
  • الخريجين
    • خريجي 1978
    • خريجي 1979
    • خريجي 1980
  • احدث الاخبار

    هام … جداً !؟

    لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين

    لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين

    سمنار حول استخدام الذكاء الصناعي في المنظومات الصناعية …

    سمنار حول استخدام الذكاء الصناعي في المنظومات الصناعية …

    اجتماع لجنة إختبار صلاحية التدريس لتخصصات العلوم الصحية والطبية بعضوية تدريسي من معهدنا …

    اجتماع لجنة إختبار صلاحية التدريس لتخصصات العلوم الصحية والطبية بعضوية تدريسي من معهدنا …

    مجلس المعهد التقني – بابل يعقد جلسته الاولى للعام الدراسي الجديد 2019-2020

    مجلس المعهد التقني – بابل يعقد جلسته الاولى للعام الدراسي الجديد 2019-2020

    سمنار شرح تقنيات حديثة مضافه إلى التقنيات التقليدية من خلال استخدام ( F.S.P )

    سمنار شرح تقنيات حديثة مضافه إلى التقنيات التقليدية من خلال استخدام ( F.S.P )

    سمنار شرح مفردات قانون التقاعد العام ..

    سمنار شرح مفردات قانون التقاعد العام ..

    عميد المعهد التقني بابل يشارك في الاجتماع الثامن للمجلس الوطني لتحسين جودة التعليم للكليات الهندسية التقنية

    عميد المعهد التقني بابل يشارك في الاجتماع الثامن للمجلس الوطني لتحسين جودة التعليم للكليات الهندسية التقنية

  • التدريسيين
  • الشعب والوحدات
    • شؤون الطلبة
    • شعبة الحاسبة والانترنت
    • شعبة ضمان الجودة
    • الشعبة الادارية
    • الشعبة المالية
    • شعبة التدقيق والرقابة
    • شعبة النشاطات الطلابية
  • احصائيات
  • البحوث المنشورة
  • الحاضنة التكنلوجية
  • اتصل بنا
    • شكاوى خاصة
  • الرئيسية
  • عن المعهد
    • رؤيا ورسالة واهداف
    • هيكلية المعهد
    • لوحة الاعلانات
    • ادارة الموقع
  • اقسام المعهد
    • الاقسام الطبية
      • قسم التحليلات المرضية
      • قسم التمريض
      • قسم صحة المجتمع
    • الاقسام الادارية
      • قسم انظمة الحاسوب
      • قسم المحاسبة
      • قسم تقنيات ادارة المواد
      • قسم الادارة القانونية
    • الاقسام التكنلوجية
      • قسم المدني
      • قسم التقنيات الالكترونية
      • قسم المساحة
      • قسم ميكانيك القدرة
      • قسم التقنيات الميكانيكية
  • الخريجين
    • خريجي 1978
    • خريجي 1979
    • خريجي 1980
  • احدث الاخبار

    هام … جداً !؟

    لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين

    لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين

    سمنار حول استخدام الذكاء الصناعي في المنظومات الصناعية …

    سمنار حول استخدام الذكاء الصناعي في المنظومات الصناعية …

    اجتماع لجنة إختبار صلاحية التدريس لتخصصات العلوم الصحية والطبية بعضوية تدريسي من معهدنا …

    اجتماع لجنة إختبار صلاحية التدريس لتخصصات العلوم الصحية والطبية بعضوية تدريسي من معهدنا …

    مجلس المعهد التقني – بابل يعقد جلسته الاولى للعام الدراسي الجديد 2019-2020

    مجلس المعهد التقني – بابل يعقد جلسته الاولى للعام الدراسي الجديد 2019-2020

    سمنار شرح تقنيات حديثة مضافه إلى التقنيات التقليدية من خلال استخدام ( F.S.P )

    سمنار شرح تقنيات حديثة مضافه إلى التقنيات التقليدية من خلال استخدام ( F.S.P )

    سمنار شرح مفردات قانون التقاعد العام ..

    سمنار شرح مفردات قانون التقاعد العام ..

    عميد المعهد التقني بابل يشارك في الاجتماع الثامن للمجلس الوطني لتحسين جودة التعليم للكليات الهندسية التقنية

    عميد المعهد التقني بابل يشارك في الاجتماع الثامن للمجلس الوطني لتحسين جودة التعليم للكليات الهندسية التقنية

  • التدريسيين
  • الشعب والوحدات
    • شؤون الطلبة
    • شعبة الحاسبة والانترنت
    • شعبة ضمان الجودة
    • الشعبة الادارية
    • الشعبة المالية
    • شعبة التدقيق والرقابة
    • شعبة النشاطات الطلابية
  • احصائيات
  • البحوث المنشورة
  • الحاضنة التكنلوجية
  • اتصل بنا
    • شكاوى خاصة
No Result
View All Result
المعهد التقني- بابل
No Result
View All Result
Home الاخبار

Child Themes for WP Framework

المعهد التقني بابل by المعهد التقني بابل
مايو 17, 2014
in الاخبار
0 0
0
0
SHARES
4
VIEWS
Share on FacebookShare on Twitter

The theme framework you’ve built will be used as a parent theme in the sites you develop. This means that in each case you’ll need to create a child theme to create a unique site with its own design and with extra or different functions compared to the framework.

The obvious way to go about this is to dive in and start creating template files in your child theme to override those in the framework, but thanks to the action and filter hooks you’ve added to your framework, this might not always be the best approach.

In this article, I’ll outline some of the techniques you can use in your child themes to make best use of your framework and improvise your workflow.

The topics I’ll cover are as follows:

Creating starter child themes
Amending code via the framework’s filter hooks
Adding code via the framework’s action hooks
Creating template files in your child theme
When to use a plugin instead
Creating Starter Child Themes framework

The main purpose of developing your theme framework is to adopt the DRY (Don’t Repeat Yourself) principle, and that applies to your child themes, too.

It can make you more efficient if you create one or more ‘starter’ child themes for use with your framework, which contain the core code you need to get started on new projects.

When deciding how to go about doing this, consider the way you work and the sites you build:

Do you create a lot of sites for clients in the same sector with similar needs?
Do you want to offer low cost template based sites to smaller clients?
Are there specific template files you tend to create for most of your new projects?
Is there functionality you need to include on some sites but not others? (For example, I use two starter child themes, one with comment functionality and one without.)
Is there styling you tend to use for most projects, or can you use object oriented styling or a CSS preprocessor for most projects?
Are there libraries or resources you use for most new projects, or for a significant proportion of them?
Do you have two or three main categories you can place projects under, with each category involving similar development work?
If you’ve answered yes to any of these questions, then developing one or more starter child themes may save you time. You can create a set of child themes with the basic code that you repeat across all projects using them, and then you don’t need to rewrite that code (or create those files) for each new project.

Note on caveat: If you’re adding some code to every single new project, you may want to add it to your framework instead of to child themes, maybe by using a hook so you can override it if a different need arises in the future.

Even if you answered no to the questions above, it’s worth creating a very basic starter theme with an empty stylesheet and functions file, and adding the instructions WordPress needs to access your framework’s parent theme .

You might also want to create a starter functions.php file with the functions you most frequently use in your child themes. You can then choose to remove any of these and/or add to them for specific projects.

Amending Code via Filter Hooks

As well as adding styling to your child theme, you’ll most likely want to make changes to the code output by the framework. The most lightweight way of doing this is via filter hooks, so it’s worth exploring those first to identify if you can use any of them.

Creating a function which you then attach to a filter hook is much more efficient than creating a whole new template file for the new code; however, if you find yourself doing this repeatedly with the same filter hook, you might want to consider changing that filter hook to an action hook and writing a new function for each project which you activate via that action hook.

To be more efficient, you might want to create a set of relevant functions which you place in the functions file of different start themes or even create a plugin with your function which you activate when needed. I’ll cover plugins in more detail later in this series.

Adding Code via Action Hooks

Your theme framework will also have action hooks which you can use to insert content in various places in your sites.

If you’ve been working on the code files for the framework bundled with this tutorial series, you’ll have seven action hooks to work with:

before the header
inside the header
before the content
after the content
in the sidebar
in the footer
after the footer.
To do this, create a functions.php file in your child theme and .

There is plenty of other content you could add using your action hooks, such as sharing buttons above or below the content, extra content in the footer, a search box in the header and much more.

You might just want to add some content on specific page types, such as single blog posts, in which case the most obvious place to start would be by creating a newsingle.php template. But you can still use your action hooks with the addition of a conditional tag.

Creating New Template Files

On occasion you won’t be able to do what you want using the filter or action hooks in your framework, in which case you’ll need to create new template files in your child themes.

These might be the same template files as are stored in your framework, in which case the files in the child theme will override them. Or they might be new template files, for example for a new category, taxonomy or post type.

If you are creating template files in your child themes, it makes things easier if you use the template files in your framework as a starting point. The steps I follow are:

Identify the template file you need to create with reference to the WordPress template hierarchy
Create a blank file with the appropriate name in your child theme
Identify the file in your framework which is closest to the new file (again with reference to the template hierarchy)
Copy the contents of that into your new file
Make amendments to the new file as required.
Doing this saves you the work of duplicating any code which will be common between your new file and the existing files in your framework, such as the calls to include files.

When to Use a Plugin Instead

Another option you have when creating sites based on your framework is to use plugins in conjunction with your child themes. A plugin won’t replace a child theme completely, but it can be useful in the following circumstances:

The functionality you want to add isn’t theme-dependent (i.e. you want to keep it if the site ever changes theme in future). This might include registering custom post types or taxonomies, for example.
You want to use this functionality on a number of the sites you create, but not enough for it to go into a starter child theme or the framework itself.
I’ll cover developing plugins for your framework in the next part of this series.

Summary

Your theme framework is just the starting point of a library of code and files you’ll create to support the sites you develop. Each site you create will need to run on a child theme, which will have your framework theme as its parent.

As we’ve seen, your child themes will add their own styling and functionality, and they can do this by hooking into the action and filter hooks in your framework, or via the creation of new template files. It’s always a good idea to adopt the solution which needs the least code, as that makes your site faster and your life easier!

from :http://code.tutsplus.com/tutorials/creating-child-themes-for-your-wordpress-theme-framework–cms-21933

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

Tags: BusinessmanDesignmomizatsuittemplatesthemesTutorialwordpress
ShareTweetShare
Previous Post

WordPress:Categories VS Tags

Next Post

The WordPress Theme Customizer

المعهد التقني بابل

المعهد التقني بابل

Next Post

The WordPress Theme Customizer

اترك تعليقاً إلغاء الرد

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *

احدث الاخبار

هام … جداً !؟

نوفمبر 15, 2019

التعليم تمدد التقديم الى الدراسة المسائية وتخفض معدل القبول

نوفمبر 15, 2019

هام طلبتنا الأعزاء….

نوفمبر 15, 2019
لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين

لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين

نوفمبر 15, 2019
حسين فاهم عبد الحسين الفتلاوي

حسين فاهم عبد الحسين الفتلاوي

نوفمبر 5, 2019

هاشم جبار مجيد وهاب الدده

نوفمبر 4, 2019
شعبة ضمان الجودة

سعدية حايف كاظم السلطاني

نوفمبر 15, 2019

اقبال غني محمد السلمان

نوفمبر 3, 2019

جوان مهدي فاضل الخفاجي

نوفمبر 3, 2019

حسون عبيد هجول كاظم الجبوري

نوفمبر 3, 2019

احدث الاخبار

  • هام … جداً !؟
  • التعليم تمدد التقديم الى الدراسة المسائية وتخفض معدل القبول
  • هام طلبتنا الأعزاء….
  • لجنة التكافل الاجتماعي في معهدنا تقوم بزيارة ميدانية الى دار رعاية المسنين
  • حسين فاهم عبد الحسين الفتلاوي

ادارة الموقع

  • دخول الايملات
  • دخول الادارة
  • التعليم الالكتروني

RSS اخبار الجامعة

  • ‏‎جامعة الفرات الأوسط التقنية مركزالحاسبة الالكترونية تقيم دورة متقدمة في برنامج الـword.
  • ‏‎جامعة الفرات الأوسط التقنية تنظم ورشة عمل حول تطبيق نظام المقررات الدراسية .
  • نتائج اعتراض طلبة الدراسة المهنية
  • اسماء طلبة الدراسة المهنية لغير المقبولين
  • اسماء طلبة الدراسة المهنية للسنوات السابقة

مواقع التواصل الاجتماعي

No Result
View All Result
  • دخول الايملات
  • دخول الادارة
  • التعليم الالكتروني

© 2019 جميع الحقوق محفوظة لمعهد التقني - الكوفة, استضافة وتصميم شركة بغداد هوست

No Result
View All Result
  • الرئيسية
  • عن المعهد
    • رؤيا ورسالة واهداف
    • هيكلية المعهد
    • لوحة الاعلانات
    • ادارة الموقع
  • اقسام المعهد
    • الاقسام الطبية
      • قسم التحليلات المرضية
      • قسم التمريض
      • قسم صحة المجتمع
    • الاقسام الادارية
      • قسم انظمة الحاسوب
      • قسم المحاسبة
      • قسم تقنيات ادارة المواد
      • قسم الادارة القانونية
    • الاقسام التكنلوجية
      • قسم المدني
      • قسم التقنيات الالكترونية
      • قسم المساحة
      • قسم ميكانيك القدرة
      • قسم التقنيات الميكانيكية
  • الخريجين
    • خريجي 1978
    • خريجي 1979
    • خريجي 1980
  • احدث الاخبار
  • التدريسيين
  • الشعب والوحدات
    • شؤون الطلبة
    • شعبة الحاسبة والانترنت
    • شعبة ضمان الجودة
    • الشعبة الادارية
    • الشعبة المالية
    • شعبة التدقيق والرقابة
    • شعبة النشاطات الطلابية
  • احصائيات
  • البحوث المنشورة
  • الحاضنة التكنلوجية
  • اتصل بنا
    • شكاوى خاصة

© 2019 جميع الحقوق محفوظة لمعهد التقني - الكوفة, استضافة وتصميم شركة بغداد هوست

Login to your account below

Forgotten Password?

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
English