Comments (1)
Thank you for this issue.
I really felt stupid, since in the functions.php of the theme the use of a child theme is encouraged, and then one of the (to me) simplest use case -- create a custom page template to include output coming from some AFC fields -- just didn't work.
I pulled several hairs, until I found this and the other closed issue #610 with the discussion.
Now, after looking at this function, I was able to add "my" template via the filter hu_content_map
in the function.php of my child theme:
function hueman_child_content_map() {
return array(
// the original templates:
'tmpl/index-tmpl',
'tmpl/archive-tmpl',
'tmpl/page-tmpl',
'tmpl/single-tmpl',
'tmpl/search-tmpl',
'tmpl/404-tmpl',
// my template:
'tmpl/page-custom-tmpl'
);
}
add_filter('hu_content_map','hueman_child_content_map');
The solution is simple: make the hu_is_authorized_tmpl pluggable.
Since the filter works, I don't think a change of the original function is needed for that template use case.
But, maybe the filter should'nt replace the original templates array, but merge with whatever one wants to add to that.
Currently using the filter without also stating the original templates would remove those, which isn't such a good idea, I'm arfraid.
Cheers!
from hueman.
Related Issues (20)
- Secondary sidebar is not sticky
- [HTML5] remove W3C deprecated attributes for script and style tags
- PHP Notice: Trying to access array offset on value of type bool
- Remove title attribute "Permalink To" on .post-title hovering with Hueman Pro 1.4.10 HOT 1
- External links problem
- Hueman 3.7.9 possible conflict with WooCommerce ?
- In Safari, Hueman loads two versions (woff+svg) of each font type
- New Query Loop Block styles broken
- [HTML] replace <section class="content" id="content"> by <main class="content" id="content">
- Possible style enhancements for BBPress pages
- Jquery problem => replace alert by a console log message
- Screenwide button backend bug
- Featured Image on frontpage shows grey block
- srcset needed on featured image
- WP-Pagenavi on a site with lots of pages breaks mobile view
- Malware..? HOT 5
- Menu - Font Awesome alignement and font issue
- Is anyone willing to post an article for me?
- [Improvment] X icon instead of twitter bird
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hueman.