Closed GoogleCodeExporter closed 9 years ago
Hmm... the whole push with the CCTM is that the post-type determines which
fields are available. The template is arbitrary because it's downstream of the
data model. WP does some bad stuff with its architecture, and altering the
fields via a changed template is the wrong way to do it in my opinion.
Architecturally, the simple and "correct" way to do this would be to have all
available fields visible in the manager screens and just hide/show the desired
fields in the templates.
Even if you wanted to integrate this feature, WP's way of supporting templates
is so whacked as to make this type of thing difficult. I see what you're
getting at, but I need to think this over a bit... it would require one more
level of abstraction, and Issue #19 would have to completed as a prerequisite,
but even then I feel like it's putting the carriage before the horse.
Original comment by ever...@fireproofsocks.com
on 26 Apr 2013 at 1:21
A GUI for this would be overwraught I think (too much cleaning of WP warts).
Perhaps some info could be added to the configuration file(s) to handle this.
Original comment by ever...@fireproofsocks.com
on 2 May 2013 at 1:51
See also issue #7.
Original comment by ever...@fireproofsocks.com
on 19 Jul 2013 at 5:40
You can do this by hiding metaboxes. When you create a metabox in the CCTM,
add some PHP to its "Visibility Control" box, e.g.
return basename( get_page_template() ) == "page-about.php"
If the statement evaluates to true, the metabox (and the fields it contains)
will be displayed. If it evaluated with false, the metabox will not show.
Original comment by ever...@fireproofsocks.com
on 4 Feb 2014 at 7:20
Hey
How can I use the Visibility function in order to show the box, only on certain
page type, or pos/page/custom_type ID.
Like "show this metabox while the page with ID 45 is edited?"
Original comment by 2...@2046.cz
on 3 Feb 2015 at 2:44
Currently the boxes and fields are tied to a post-type, not to a specific post.
Is that what you mean?
Original comment by ever...@fireproofsocks.com
on 3 Feb 2015 at 3:43
Original issue reported on code.google.com by
tra...@gmail.com
on 26 Apr 2013 at 1:10