-
AuthorPosts
-
August 27, 2015 at 8:22 pm #494428
Hi and thx again for this awesome theme.
I would like to modify the template for every single pages of portfolio (page with the detail of 1 specific portfolio) to add some html at the beginning of the portfolio content section (below header and over portfolio detail)
I am using a child theme so basically i tryed to copy single-portfolio.php to my child theme and write things in it but nothing shows… So i also tryed to copy includes/loop-portfolio-single.php to my child theme and add content to it and also nothing show…
Do you have any Idea about what could be the problem or where should i add my code?
Thanks in advance
August 27, 2015 at 10:16 pm #494489Hey lepetitweb!
Do you need to add those infos after the body?
What code is it?Thank u
Best regards,
BasilisAugust 27, 2015 at 10:38 pm #494523i want to add a slideshow and a short text block below the breadcrumb bar. I dont want to have to change it on all portfolio if it change so i want it to be in the portfolio single page template.
I actually achieved to do it in a dirty way a few mins ago after finding more info on the forum
I added this code in template-builder.php
if (is_singular('portfolio')){ $laposition = strpos($content, "'container'"); $temp = substr($content, 0, $laposition-11); $temp .= do_shortcode("[av_layerslider id='99']"); $temp .= substr($content, $laposition-11, strlen($content)); $content = $temp; } echo $content;
Finding a string in the content, targeting the spot where i want my stuff and then insert my content in it, but there must be a cleaner way to do it, maybe with a hook or a filter
August 31, 2015 at 5:50 pm #496022Hey!
Why not just use the layout builder to add it to your portfolio post content at the top? If your just trying to add the same content to each post to make it easier on yourself then you would have to edit the portfolio single template file like how your doing.
Best regards,
ElliottAugust 31, 2015 at 5:58 pm #496026Hi and thanks to have had a look at my question.
We have 568 portfolios in french and english languages so over 1100 at total… the header we want to add will change from time to time so we dont want to have to change each portfolio 1 by 1 using the builder…
Anyway the way i done it works… It’s kinda dirty but it does work and i’ll keep it like that then
Thanks for your help
September 1, 2015 at 7:40 am #496260 -
AuthorPosts
- You must be logged in to reply to this topic.