Tagged: x
-
AuthorPosts
-
March 23, 2017 at 8:44 am #1417630
Hi there
Is there a Best Peactice to follow in order to replicate (in a Child environment) the Portfolio Post structure, in order to use this replicated structure for Custom Post?
Thank You
March 23, 2017 at 9:37 am #1417712Hey There,
Thanks for writing in!
Regretfully, at this time I am not entirely certain what it is you’re trying to do.
If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do. We’ll be happy to provide you with a response once we have a better understanding of the situation.Thanks for understanding!
March 23, 2017 at 10:55 am #1417842I’m sorry (for my confusion)
I try to explain better my request
I’d like to create a NEW Custom Post Type and create a new Template (using x-portfolio template structure).
Something like explained here:
orIs there a “Best Practice” in order to create this kind of customization?
Thank You
March 23, 2017 at 8:51 pm #1418508Hi there,
You have to create templates for every post type, you can’t re-use existing x-portfolio templates (eg. sharing single templates). But you can duplicate x-portfolio templates and rename them to your preferred post type templates.
These are the x-portfolio templates
/x/template-layout-portfolio.php
/x/single-x-portfolio.php
/x/framework/views/global/_portfolio.php
/x/framework/views/global/_script-isotope-portfolio.php
/x/framework/views/{SELECTED STACK IN CUSTOMIZER}/content-portfolio.php
/x/framework/views/{SELECTED STACK IN CUSTOMIZER}/template-layout-portfolio.phpYou can duplicate them to your child theme and rename them, and while you rename them you should also change some code to match the renamed files.
Example, Let’s say this code
<?php x_get_view( $stack, 'content', 'portfolio' ); ?>
You created a duplicate of
/x/framework/views/{SELECTED STACK IN CUSTOMIZER}/content-portfolio.php
to
/x/framework/views/{SELECTED STACK IN CUSTOMIZER}/content-work.phpthen the code will be
<?php x_get_view( $stack, 'content', 'work' ); ?>
Some features are only available for portfolio post type and you’ll not able to replicate them.
Hope this helps.
-
AuthorPosts