Notifications
Clear all

How to display the custom fields in the post.php & topic.php

11 Posts
5 Users
0 Reactions
12.8 K Views
Posts: 4214
 Tom
Admin
(@tomson)
Famed Member
Joined: 10 years ago
Posted by: Mister

Thank you that works well but only for a user.
How to make the & id value suitable for all forum users?

This information is displayed in the user's information and is displayed in the view of everyone.

Thanks you

As it's already mentioned this function is only for user with ID=15. You should use $member['userid'] member variable ID instead of 15.

 

Reply
Posts: 19
Customer
Topic starter
(@mister)
Member
Joined: 7 years ago

Ok it's perfect 🙂

Thanks you very much 

MP

Reply
Posts: 13
(@faithnall)
Active Member
Joined: 7 years ago

Mister, you get it work.
So can you tell me where to add the Lines, the support for this (for me) MAIN Feature is not the best here.

 

I have add the Line Number two for a test in post.php after Line 33:

 <?php wpforo_member_badge($member) ?>
<div class="author-joined"><?php wpforo_phrase('Joined') ?>:<?php wpforo_date($member['user_registered']); ?></div>
<div class="author-posts"><?php wpforo_phrase('Posts') ?>: <?php echo intval($member['posts']) ?></div>
<div class="author-posts"><?php if (function_exists('wpfucfTheField')) {wpfucfTheField($member['userid'], "field_c5a0017", $before = '<h4>', $after = '</h4>');?></div>

But this ends in an error inside the foreach loop.

Next step i try to add the other line befor and after this

 

<? if (function_exists('wpfucfGetField')) {$fieldValue = wpfucfGetField(15, "field_c5a0017");}?>

 

But with the same end. It dos not work.

Reply
Posts: 4214
 Tom
Admin
(@tomson)
Famed Member
Joined: 10 years ago

@faithnall, wpForo 1.4.7 is released and you can use core function instead of addon function. Please use this function and set field as the attribute.

<?php wpforo_user_field( 'field_name' ); ?>

 

Reply
Page 2 / 2
Share:
Scroll to top