Custom fields in new portfolio projects - by designerobot

This topic has 21 replies, 2 voices, and was last updated 7 years, 1 months ago ago by Rose Tyler

  • Avatar: designerobot
    designerobot
    Participant
    August 11, 2017 at 03:14

    I’m trying to do a thing that should be really simple but it seems impossible in Portfolio section of WooPress theme.

    My target is to have an effect like shown in pic 01. Namely add country and year after the category in the ByLine section of the Portfolio.
    To simulate this effect I did a simple modification in my content-portfolio.php inside the child (see pic 02).

    Well, after having tested the effect, I tried to create two custom fields in order to insert these data (namely country and year) in every portfolio project.

    The problem is that I have the possibility to activate the custom fields in normal posts (see pic 03) but not in portfolio project (see pic 04).

    There is way to activate them in portfolio too?
    Alternatively, there is another way to obtain this effect? The best could be to have this insertion managed like a category, so I every time in every project I need only to flag the right country o the right year (this help me with the translation with WPML, because in this last case I would need to translate taxonomy only the first one and not the fields in every project).
    Let me know please.

    Please, contact administrator
    for this information.
    20 Answers
    Avatar: designerobot
    designerobot
    Participant
    August 12, 2017 at 02:03

    In addition to the previous question, could you tell me what is the file I’ve to modify to insert the title automatically at the beginning of every portfolio project?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 14, 2017 at 12:41

    Hello,

    1. Unfortunately, your query requires additional customization in theme source files which is out of our basic support scope. If you need help with additional customization you may contact WPKraken team.
    2. wp-content/themes/woopress/ single-etheme_portfolio.php, content-portfolio.php, portfolio-slide.php files.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    August 14, 2017 at 14:27

    1. Speaking with WPKraken Team is frustrating, you cannot speak directly with a tech person… there is always the filter of an account (I suppose) than doesn’t understand anything of what you really need and she asks absourd amounts for stupid things too. Think that last time they asked to me 150 Dollars and three days of work for a thing that an external developer after made for free because he told me it required only ten minutes to him.
    Said this, I don’t think the service offered by WPKraken Team is serious and professional and it is the only (BIG) negative aspect of 8Theme.
    Therefore, please help me to solve this matter in another way. I asked to the same previous developerd (very skilled and smart) and he replied to me to change theme, because according to him the things I asked should be very simple but the portfolio page made by 8Theme doesn’t permit it.
    Could you give me as much information as possible about this matter so that I can pass them to the developer and solve the question in a way that is affordable for me?
    For example what files have to be modified in this case? If you have some ideas of what scripts/concept to insert, tell me and I pass these info to him to facilitate his works.

    2. Do I need to modify all three files or I could choose only one of it? I thought the resulting page of the project was generated from one file only. Do you have idea of what code I need to inster or this is out of our basic support scope too?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 15, 2017 at 10:19

    Hello,

    You may hire another developer to make needed customization. We cooperate with WPKraken Team, but you may find another team which would meet your requirements.
    Please read more about basic support – https://themeforest.net/page/item_support_policy
    Use child theme to prevent losing changes after theme update https://codex.wordpress.org/Child_Themes
    2. Additional code – out of our basic support scope too, but if you explain the questions with more detail and provide me screenshot to better understanding where exactly you want to insert the title automatically (because on portfolio page and on project page already titles are shown), I will say name of needed file.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 4, 2017 at 11:10

    Hi, thanks for your help.
    As asked, here are all screenshots of what I would like to obtain.
    See below in PVT content the link to the 4 screenshots to better understand the result I’m trying to obtain.

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 6, 2017 at 10:14

    Hello,

    1. It would be right to show year by using get_post_time() function https://developer.wordpress.org/reference/functions/get_post_time/
    for “country” you need add custom meta field for the portfolio by using custom meta boxes in framework/theme-options.php, you will be needed to create, in child theme, function like posts_meta_boxes() but for the portfolio.
    2. Edit breadcrumbs in framework/theme-functions.php file (et_page_heading() and etheme_breadcrumbs() functions).

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 27, 2017 at 13:45

    With the help of an external developer, I was able to do (almost) all the things above. Only one thing is not yet working perfectly.

    To obtain this (https://prnt.sc/gqbi92, see the Category showed by the red arrow) on the main portfolio page, I insert this code (https://prnt.sc/gqbj7h).

    I tried to do the same on the single portfolio page (https://prnt.sc/gqbjwx) inserting the code here (https://prnt.sc/gqbk6x) but in this case the code <?php child_print_item_cats($postId); ?> doesn’t work in child/single-etheme_portfolio.php

    Why? I need to modify it in some way?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 28, 2017 at 12:38

    Hello,

    Did you write child_print_item_cats() function yourself? We do not have this function in our theme.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 28, 2017 at 12:39

    Hello. I don’t understand… the other part of the code (perfectly working) is in single-etheme_portfolio.php, not in portfolio-slide.php
    What I need to insert in portfolio-slide.php? And where, because it seems not involved in the page the I want to modify, that is this: see link in pvt content

    Please, contact administrator
    for this information.
    Avatar: designerobot
    designerobot
    Participant
    September 28, 2017 at 12:41

    I think that the child_print_item_cats() function was made by you or your colleagues in past, when I asked how to show categories in order of slug instead of alphabetically for category

    Avatar: designerobot
    designerobot
    Participant
    September 28, 2017 at 12:43

    In content-porfolio.php this custom function works, as you can see from the previous screenshot.
    I need the same thing in the other page

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 28, 2017 at 14:35

    Please make changes in single-etheme_portfolio.php of child theme,
    at the top of the file write – http://prntscr.com/gqrlf5 (global $post)
    then add this code:

    <?php $terms = wp_get_post_terms( $post->ID, 'portfolio_category' ); 
    $categories = array(); ?>
    <?php foreach ( $terms as $term ) {
     array_push( $categories, $term->name);
    } ?>

    https://prnt.sc/gqrnhj,
    and change CATEGORY word to
    <?php echo ( isset($categories[1]) ? $categories[1] : $categories[0]); ?>

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 29, 2017 at 10:10

    Many thanks for your help.
    I inserted all 3 parts of suggested codes and the result was a completely white page (sic!).
    After several tests, I discovered that removing the first step (the code (global $post)) the page works again.
    Unfortunately, the script is not completely working, the problem is:
    – if I’ve more than a category, only the last category inserted is visible (the other categories are hidden)
    – if the category IN EVIDENZA/IN EVIDENCE is present, it is showed… while in past we inserted the code to hidden this category in the description (it is showed only on the button).
    Could be possible to insert something like <?php child_print_item_cats($postId); ?> that in other pages works better? Or do you have any other idea?

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 29, 2017 at 13:25

    Hello,

    We made some changes in single-etheme_portfolio.php file. Please check now.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 29, 2017 at 14:56

    Hello, now it’s better, in fact all categories are showed.
    Unfortunately, it is not yet perfect because also the category “IN EVIDENZA” is visible, while it should be hidden.
    If you remember, in past, on the portfolio summary page we did that this special category was showed only on the button but not in the description.
    Could you correct this last thing please in this page too?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 29, 2017 at 15:00

    Please provide screenshots for better understanding where you want to hide the category and where it is should be visible.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 29, 2017 at 15:14

    Here is two screenshots to better understand. See below in pvt content

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 29, 2017 at 16:01

    Please check now.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 29, 2017 at 17:06

    Now it is perfect. Many many thanks!!!

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 2, 2017 at 08:12

    You’re welcome!

    Regards

  • Viewing 21 results - 1 through 21 (of 21 total)

The issue related to '‘Custom fields in new portfolio projects’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.