Tagged: x
-
AuthorPosts
-
July 13, 2016 at 6:25 am #1084671
shriyash802ParticipantHi…
I have set up custom post type named ‘Staff’ and want to use acf to display staff members info such as Address,Age,Gender,Qualification etc.All set up is done but not sure how to display all this fields in theme.July 13, 2016 at 8:51 am #1084868
ThaiModeratorHi There,
You can try with the ACF shortcode:
[acf field="field_name"]For more information, please take a look at this article: https://www.advancedcustomfields.com/resources/shortcode/.
Hope it helps 🙂
July 13, 2016 at 12:07 pm #1085239
shriyash802ParticipantSorry.I am totally new to CPT and ACF.But where to put these shortcodes.I recently searched and tried some modifications in single-post.php files.It partially worked.Custom post content was out of content area.What can be reason ?
July 13, 2016 at 9:27 pm #1086092
LelyModeratorHi There,
Thanks for posting in. This would be outside the content area if you have added it outside the main container. If you’re using Cornerstone, above shortcode will work on a RAW CONTENT element or TEXT element. If you really want it to add on a template file, please add it after this line:
<div class="x-container max width main">
Or it would be better if you will share the code you have edited so we can check.Hope this helps.
July 16, 2016 at 10:54 am #1089911
shriyash802ParticipantHi.This is a code….
<?php
// =============================================================================
// VIEWS/INTEGRITY/WP-SINGLE-STAFF.PHP
// —————————————————————————–
// Single staff post output for Integrity.
// =============================================================================?>
<?php get_header(); ?>
<div class=”x-container max width offset”>
<div class=”x-main full” role=”main”><?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( ‘integrity’, ‘content’, ‘staff’ ); ?>
<p><?php the_field(‘bio’); ?></p>
<p><?php the_field(‘address’); ?></p>
<?php x_get_view( ‘global’, ‘_comments-template’ ); ?>
<?php endwhile; ?></div>
</div><?php get_footer(); ?>
July 16, 2016 at 10:57 am #1089912
shriyash802Participantlink of the page
July 16, 2016 at 11:59 am #1089942
shriyash802ParticipantProblem solved using corner stone.
July 16, 2016 at 8:49 pm #1090247
Rue NelModeratorHello There,
We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!Best Regards.
September 10, 2016 at 6:37 pm #1169579
garcoscParticipantHello:
I have a question, How use a ACF repeater wuth shortcode in Cornesrstone?Kind regards
September 10, 2016 at 7:23 pm #1169597
garcoscParticipantI have a ACF Ingredients with two fields (cant, description)
Per example:
cant: 300
description: fishcant: 200
description: butterif i put {{acf:ingredients}} shows Array, Array
I supposed that each Array is a variable (cant, description)
if put single (without loop)
{{acf:ingredients_0_cant}} shows 300
{{acf:ingredients_1_cant}} shows 200
{{acf:ingredients_0_description}} shows fish
{{acf:ingredients_1_description}} shows butter¿but can i solve this with javascript ?
please my brain is shutdown
Kind regards
September 11, 2016 at 3:13 am #1169900
ChristianModeratorHey there,
That is currently not supported. Please stay tuned for updates.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1084671 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
