Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1205411
    rafael
    Participant

    I have an issue that looks similar to what happened in this topic. But what seemed to be the solution there didn’t work for me. Each one of my portfolio items already have a category, but the following message still displays on portfolio archive page:

    Warning: in_array() expects parameter 2 to be array, string given in /localhost/development_env/wp-content/themes/x/framework/functions/global/portfolio.php on line 112
    
    Warning: Invalid argument supplied for foreach() in /localhost/development_env/wp-content/themes/x/framework/functions/global/portfolio.php on line 128

    I’m testing some changes using LAMPP on my desktop before it goes to the live website.

    I’m using ‘clientes’ as the slug of the CPT instead of ‘portfolio-item’. And I setup a page with the same slug, ‘clientes’. I believe that this way I can customize on Cornerstone how my portfolio is displayed. This page is set to use the template ‘Layout – Portfolio’.

    If I change the slug of the page to anything other than ‘clientes’, the portfolio is displayed correctly, but not the way I want. When the slug of the page is ‘clientes’, then the PHP warnings come up and the portfolio is not displayed.

    How should the page be configured to work properly? Or should I use a different approach to customize the look of portfolio archive page?

    #1205532
    Rupok
    Member

    Hi there,

    If you have a page with the slug “clientes”, you can’t use this as portfolio slug again because it would be in same level slug and must conflict. Kindly use a different slug as it won’t work.

    Thanks!

    #1205582
    rafael
    Participant

    I changed Portfolio slug back to its default, ‘portfolio-item’. The page with slug ‘clientes’ is using the template ‘Layout – Portfolio’, and it is displaying the PHP warnings I posted above. I’ll keep investigating, but I don’t seem to find why the page is not working like the demo page, http://demo.theme.co/integrity-1/portfolio/.

    #1205597
    rafael
    Participant

    I found what I believe was causing the problem.

    I went to the page wp-admin/options-permalink.php and just clicked to save the changes, even though there was no change on that page, to flush the permalink structure.

    Also I set portfolio slug as ‘clientes’ and have a page with the slug ‘clientes’. The page has precedence and it’s content will be displayed. Then to display the portfolio items, the page has to use the template ‘Layout – Portfolio’. 😉

    #1205840
    Jade
    Moderator

    Glad to hear you got it sorted, Rafael.

  • <script> jQuery(function($){ $("#no-reply-1205411 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>