Tagged: x
-
AuthorPosts
-
January 30, 2017 at 7:38 am #1350684
sportsnapperParticipantHi,
Sorry, recurring theme question – but there appear to be many different answers.. I’d like to see this as a part of the theme really.
Anyway, I’ve successfully added some text above the portfolio items on one of my portfolio pages, taking the text from the content in the backend editor. I’ve used this post (dated 2014). I added to /wp-content/themes/[child-theme-or-theme-here]/framework/views/[your-stack-here]/template-layout-portfolio.php this code:
<!-- This adds the text in the content box on the portfolio page above th eportfolio grid --> <?php while ( have_posts() ) : the_post(); ?> <?php x_get_view( 'global', '_content', 'the-content' ); ?> <?php endwhile; ?>If I wanted to change this to add text after the portfolio items, where do I put the code – I’d still like to be able to edit the portfolio page rather than have to edit the code to make changes to the etx.
January 30, 2017 at 7:58 am #1350721
ChristianModeratorHey there,
Since you’ve used the content area already, you’ll need to use custom fields to be able to add content in the page editor. For that, please use ACF Pro which comes bundled with X and see the usage instruction at https://community.theme.co/kb/integrated-plugins-acf-pro/.
Thanks.
January 30, 2017 at 8:00 am #1350724
sportsnapperParticipantOK – I can see how that would work. However, If I decide that the text is better after the portfolio items, and I remove the existing customisation how would I put text in that position still using the content area
January 30, 2017 at 8:26 am #1350765
ChristianModeratorYou’ll see this code in the template-layout-portfolio.php
<?php x_get_view( 'global', '_portfolio' ); ?>Just add the code after it.
Or you could try adding HTML in the template to see the output in the front-end so you have an idea of how the structure works.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1350684 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
