Tagged: x
-
AuthorPosts
-
October 6, 2016 at 12:33 pm #1205411
rafaelParticipantI 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 128I’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?
October 6, 2016 at 1:48 pm #1205532
RupokMemberHi 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!
October 6, 2016 at 2:23 pm #1205582
rafaelParticipantI 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/.
October 6, 2016 at 2:33 pm #1205597
rafaelParticipantI found what I believe was causing the problem.
I went to the page
wp-admin/options-permalink.phpand 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’. 😉
October 6, 2016 at 5:22 pm #1205840
JadeModeratorGlad to hear you got it sorted, Rafael.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1205411 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
