I am trying to show the custom filed group on post page but it does not show.
For the single page, I use 'single-character-en.php' and for archive page, I use wp-archive (toolset).
I need php code to embed inside of my 'single-character-en.php' to show custom field group.
I tried these, but still not showing.
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/
https://toolset.com/documentation/customizing-sites-using-php/displaying-repeating-fields-one-kind/
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Shannon,
Thank you for contacting our support forum.
Would you mind letting me know which field group you are having the issue with and also can I get admin access so that I can check on this field group.
Thanks,
Shane
Hello Shane,
thank you for the reply.
[Character posts]
Inside of character skills (custom fields) -> skill table (repeatable group).
Once you provide me an email, I will give you access (It can take some time because I need to send a request to the person who can give you an access).
Thank you 🙂
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Shannon,
You can use the email shane.c@onthegosystems.com
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Shannon,
I see what you want now.
You will need to display the field group using views but you can render the view template in php using the function below.
https://toolset.com/documentation/programmer-reference/views-api/#render_view
Please let me know if this helps.
Thanks,
Shane
I tried but still nothing showing up...
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Shannon,
Would you mind resending the credentials once more as I seem to have deleted it from the forum.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Shannon,
I took a look at the site again and i'm not seeing where a view was created for the repeated field groups.
You will need to create a view to list the repeated fields.
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/
Then you just add the view to the php template using this below.
https://toolset.com/documentation/programmer-reference/views-api/#render_view
Thanks,
Shane
Thank you for reply.
Sorry I forgot I delete the view area.
I add the view area and add these code in the 'single-character-en.php':
<div class="skill-row skill-row7">
<?Php
$skill_table = get_view_query_results( 5302 );
foreach ( $skill_table as $skill_tables ) {
echo $skill_tables->post_title;
}
?>
</div>
<div class="skill-row skill-row8">
<?Php
$skilltable = array(
'title' => 'skill-name'
);
echo render_view( $skilltable );
?>
</div>
<div class="skill-row skill-row9">
<?Php
echo render_view_template( 5302, $skilltable );
?>
</div>
but it just shows one line like this on the live page:
5285skill second row5214skill first row
I don't know.. what I am doing wrong...
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Shannon,
Could you try again?
You needed to have added the filter so that it knows which information to display using views.
Thanks,
Shane
it's working now 🙂
I suppose to write
'title' => 'skilltable'
not 'title' => 'skill-name'
Thank you for the help 🙂