Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-settings.php on line 186

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/backpress/functions.wp-object-cache.php on line 108

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/backpress/pomo/mo.php on line 171

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/functions.bb-l10n.php on line 484

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/backpress/class.wp-taxonomy.php on line 581
A feature sugestion: hybrid_reuse_parent_template() « Community

Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

The community forums are currently being phased out. At the end of February or early March 2012, you will no longer be able to post here. This is because the entire site is being restructured. Please use the main forums for discussions.

A feature sugestion: hybrid_reuse_parent_template()

  1. Hi,

    there are a feature that I think could be interesting, but sometimes I ask myself if it maybe could problematic or not.

    For example, suppose I want to override the home.php in my child-theme. What I want to do is just removing breadcrumb. So the code would be something similar to this:

    <?php

    // some code using hooks to diable breadcrumb

    hybrid_reuse_parent_template();

    I know that I could get the same result just using function.php. I know too that contextual hooks would be very welcome. But I like the idea to put my changes next to the problem that I need to solve.

    Many people will probably prefer just copying the parent-theme template content and there no problems with that, but there are guys like me that prefer something more clean using hooks.

    What Do you think about? Is some feature cool? Is it good if hybrid-core has this feature? Should I implement just by myself? There some dangerous thing about this feature that I'm not seeing?

    Thanks,
    Thiago Senna

  2. I don't think anything like this is possible, to be honest.

    From what I understand, your example code would be within a home.php template in the child theme?

  3. Yes, in this sample would be within 'home.php'. Should be something similar to 'get_template_part()', but the differences are:

    - Look for and load the template in the parent that will be overrided.
    - Ignore templates from child-themes.

    Is it more clear now?

Reply

You must log in to post.

Topic Info

Topic Tags:

No tags yet.