Home Forums Theme support Dublicate Post Type

This topic contains 11 replies, has 2 voices, and was last updated by  7Theme Support 5 years, 10 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • Hi There,
    I would like to use aroud 6 different portfolio page to categorize my products.

    Please advice which codes or files I have to dublicate…

    Thank you…

    Hi,

    what theme do you use?

    Theme is not clear at the moment but I would like to know the basics. I will definetley use more than one portfolio…

    Normally you don’t have to duplicate any files. The portfolio in all themes comes with categories where you can categorize your works / portfolio entries.

    Yes but I want to create categories like:

    City1:Portfolio Category>Portfolio Item>Single-Portfolio
    City2:Portfolio Category>Portfolio Item>Single-Portfolio
    City3:Portfolio Category>Portfolio Item>Single-Portfolio
    City4:Portfolio Category>Portfolio Item>Single-Portfolio
    City5:Portfolio Category>Portfolio Item>Single-Portfolio
    City6:Portfolio Category>Portfolio Item>Single-Portfolio

    How do I do that… ?

    Thank You…

    Hm, I think you need an extra category, this should be the easiest way. But it’s not what you can do with just some clicks, you have to change also the shortcodes to make this possible.

    Do you know how to work with PHP code? And WordPress code / functions?

    Hi there,

    Yes I do a bit. I did once with other theme but not from yours…
    You have different structure…

    If you write me the instructtions I will figure it out.

    Thank you very much…

    Hi,

    normally this is not covered by free support, but we can help you with the basics.

    Ok, to add the extra category please add this at the end of your functions.php file:

    register_taxonomy(“portfolio-city”, array(“portfolio”), array(“hierarchical” => true, “label” => “City”, “singular_label” => “City”, “rewrite” => true));

    (This will add the extra category to portfolio)

    Then search for the grid shortcode function (called: function “portfolio_shortcode”) in “posttype-portfolio.php” file in the “7league/” folder.

    Add the extra option to the options, for example:

    extract(shortcode_atts(array(
    	'number'=>'5',
    	'columns'=>'2',
    	'city'=>'',       // THIS IS THE LINE WITH THE NEW CODE

    Then search for this code (the query options):

    ($args = array( 'numberposts' => $number, 'post_type'=>'portfolio','post_status' => 'publish', 'project-type'=>$type);)

    and change it to this:

    $args = array( 'numberposts' => $number, 'post_type'=>'portfolio','post_status' => 'publish', 'project-type'=>$type, 'portfolio-city' => $city );

    Thank you for your exception.

    Ok I did according to your instructions but nothing has changed.Where do I create City and categories under that City and put the items under that category…

    What I realy mean is to create complete dublicte of Portfolio and its pages and functions. I will name each as different City Name and put different Project types and Portfolio items. Thats what I need actually.

     Dublicated portfolio
    It is an example that I did earlier. All listed are different Portfolio Post type..

    Please advice…

    Ok I did according to your instructions but nothing has changed.Where do I create City and categories under that City and put the items under that category…

    The code we gave you add a new taxonomy ( City ) to the portfolio, visible in WordPress admin -> Portfolio -> City (sub menu entry).

    What I realy mean is to create complete dublicte of Portfolio and its pages and functions. I will name each as different City Name and put different Project types and Portfolio items. Thats what I need actually.

    Yes, I know what you mean, but you cannot create this with only 2 lines of code, that’s not possible. What you mean is to create foreach of the “portfolios” and extra Post type with own shortcodes. But you need hundreds lines of code, and as I said before, customizations are not included in free support.

    Hi There,
    Yes I know the difficulties and I did it earlier. If you can just tell me which files I have to dublicate and rename and which files to add copy codes and rename portfolio than I will figure it out.

    Possibly structure is the same in your all themes isn’t it?

    Why I am asking this because, just one portfolio is not exceeding my expectations. This will allow me to create more user friendly web sites under your tepmlates.

    You might think of creating a solution for your past and future themes and it will rock…

    Thank you in advanced…

    Hi,

    the structure is always the same in all our themes.

    The main file of the portfolio is the file “posttype-portfolio.php” in the “7league/” folder in the theme.

    You can try to copy the file, but you have to rename all function names in the copied files.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.