Okay
  Public Ticket #973091
Mammoth WP theme customising
Closed

Comments

  • Samuel started the conversation

    Hello, I’ve created a page to show a galley of portfolio items by modifying a homepage. 

    So I have 3 columns showing item image with title below. I want to show below title, the category / type that each item belongs to. I’m no php expert so other than copying and making simple mods to existing code from post template, which I tried but can’t get to work, I’ve no idea how to do this. 

    Can you suggest some code that would work? I’m using version 2.4.1.

    Also a way to show only items / posts in a specific category only? 

  •  145
    Barbi replied

    Hi Samuel

    You would want to use something like this:

    <?php 
    $portfolio_categories = get_the_term_list( $post->ID, 'cr3ativportfolio_type', '', ', ', ''); ?>
    <?php if ($portfolio_categories !=( '')) { ?>
    <?php echo get_the_term_list( $post->ID, 'cr3ativportfolio_type', '', ', ', '' ); ?>
    <?php } ?>
    

     inside your template - that will pull back (inside the loop) any and all categories the portfolio item is assigned to and link them (if clicked) to the template that would display ALL portfolio items from that particular category.

    Hope that helps!

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    That code would need to be added to all templates that show products (homepage, category page, tag page, edd index page, vendor page etc).  But you would want to use a child theme, any edits you make to the files will be wiped out on updating the theme (which we are currently prepping).

    As for showing, I'm not sure I follow.  That code would show the category name and link?

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Sorry - is this Squarecode or Mammoth we are talking about?  

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    Can you supply a link to the site and a temporary login.  I'm still unclear what theme we are referring to as the ticket is listed under general so I have no purchase verification supplied with the ticket.

    Could you please update the ticket to supply your license for the theme as well please.  Support can only be given to verified purchases.

    Thanks

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    Oh I see what the issue is now, we are in the process of updating Mammoth so you have the Cr3ativ Portfolio plugin installed, but you are actually still using the built-in CPT for Mammoth.

    Can you please enter your Portfolio items here:

    Then using the code previously provided you should be able to see the category under the Portfolio Items.

    I'm including a new XML as well as we are working on updating the theme using the Elementor plugin as well.

    I apologize for the confusion, please let me know if that helps!

    Attached files:  mammoth-wp.zip
      mammoth.wordpress.2017-04-17.xml.zip

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    Did you not want to install the updated version of the theme?  You want to keep using the older version?

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    No worries, if you are going to use the old theme, then you can deactivate the Cr3ativ Portfolio plugin as it's not needed with this version (it's a built in CPT).

    And instead of using that code I gave you earlier, use this code instead:

    <?php 
    $portfolio_categories = get_the_term_list( $post->ID, 'types', '', ', ', ''); ?>
    <?php if ($portfolio_categories !=( '')) { ?>
    <?php echo get_the_term_list( $post->ID, 'types', '', ', ', '' ); ?>
    <?php } ?>
    

    this will show the category for the portfolio items (the built-in CPT).

    The issues you are experiencing with the other page templates was likely fixed in a later release.  However without updating there's not a lot I can do as I no longer have the older versions.  If you do update, then you need to transfer over your Portfolio items to use the plugin instead of the built-in CPT and update the code above to use the original snippet I gave you.

    Themeforest had a push some time ago to reject any themes with built-in post types such as this so we had to change everything over to a plugin.  By doing this means when you update the theme you will loose any portfolio items you already had entered and would need to re-enter them using the plugin.  Unfortunately that was the only way we could keep Mammoth up-to-date on Themeforest.

    Unfortunately that theme has now been retired.

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    I will do this for you out of courtesy since we're going to be releasing the new look as a new theme rather than an update.

    I can do this for you over the weekend.  Are the login details still valid?  Do you want me to replace all the content on your site so I'm importing our dummy content?

    I'm still tweaking it but have had to take on a couple of client projects and that with the FT job has had me switching gears so it's not quite ready yet.

    Please let me know, thanks!

    Thanks

  •   Samuel replied privately
  •  145
    Barbi replied

    Hi Samuel

    No worries, I updated your ticket to private so that the information can't be seen.  

    You're all set!

    Thanks