• Welcome to the all-new Kolakube support, the official place to get help for Marketers Delight, XFtoWP, CryptoWP, and other WordPress products! Please login with your account details to access private support forums.

No pinned post and Users

Rush

Member
XFtoWP
Messages
24
Reaction score
2
is there a way to not have the first post show (the pinned one) and just have start the discussion. It's really confusing have the same post snippet appear directly underneath the post they have just read right above it.

Also, in our case, we can't sync the users so I am trying to figure out if there is a way for the system to get the user data once they have logged in via the forums so they can post a comment. In other words don't check against the WP user DB but have the system recognise they have logged in already on Xenforo and use that info to get the user data.

I am guessing that XFtoWP is not going to work out for us as it's so WP focused but it was worth a punt :)
 

Alex

MD developer
Staff member
Md
XFtoWP
Messages
6,195
Reaction score
1,745
Hi Rush,

is there a way to not have the first post show (the pinned one) and just have start the discussion. It's really confusing have the same post snippet appear directly underneath the post they have just read right above it.
Yes, you can disable that checkbox option under the "Thread comments" settings.

Also, in our case, we can't sync the users so I am trying to figure out if there is a way for the system to get the user data once they have logged in via the forums so they can post a comment. In other words don't check against the WP user DB but have the system recognise they have logged in already on Xenforo and use that info to get the user data.
That is our current development focus and the bulk processor tool that reads XF users and syncs them to WP is in the works.
 
Comment

Rush

Member
XFtoWP
Messages
24
Reaction score
2
Hi Rush,


Yes, you can disable that checkbox option under the "Thread comments" settings.


That is our current development focus and the bulk processor tool that reads XF users and syncs them to WP is in the works.
Thanks for the response Alex. I'll see if I can find that option but may just hang on for another update and see how it plays out.,
 
Comment

Rush

Member
XFtoWP
Messages
24
Reaction score
2
Thanks for the response Alex. I'll see if I can find that option but may just hang on for another update and see how it plays out.,
I see you can remove it if there are replies but what I want is to remove it if there are no replies.
 
Comment

Alex

MD developer
Staff member
Md
XFtoWP
Messages
6,195
Reaction score
1,745
I see you can remove it if there are replies but what I want is to remove it if there are no replies.
To change the logic I recommend making a simple template edit in your WP child theme.

Step 1: Via FTP open /wp-content/plugins/XFWP/templates/comments/comments-list.php

This file is the second file in the template load order that gives you control over most of the comments template for any design view selected. Once opened, copy the entire contents of this file.

Step 2: In your child theme mimic the same file path and create a new comments-list.php file.

The directory should be: /wp-content/themes/YOUR_THEME/templates/comments/comments-list.php

Now paste the contents of that file inside this new file, and XFtoWP will load your child theme file instead of the file shipped in the plugin. You can do this for any other template located in the /templates/ folder.

Step 3: Finally, to achieve what you are asking, find this markup, which renders the comments list:

PHP:
<div id="forum-comments-list" class="forum-comments-list comment-list">
    <?php xf_comment( $replies ); ?>
</div>

and change what shows based on how many posts are available (untested):

CSS:
<div id="forum-comments-list" class="forum-comments-list comment-list">
    <?php if ( $posts_count > 0 ) : ?>
        <?php xf_comment( $replies ); ?>
    <?php else : ?>
        <p>No comments!</p>
    <?php endif; ?>
</div>

Let me know how it goes!
 
Comment

Rush

Member
XFtoWP
Messages
24
Reaction score
2
Hi Alex

A bit of a delayed response to this as I have only just got around to tackling it. I tried the above but no luck, no change on what appears at all. I am running the latest stable version a the moment. Could something have possible changes since you sent this message over?

I have tried it in /theme/templates/comments and also /theme/plugins/XFWP/templates/comments.

Cheers
Paul
 
Comment

Rush

Member
XFtoWP
Messages
24
Reaction score
2
According to Alex, if you copy your XFWP comment-list.php template into your child theme you can make changes to it without messing with the core file. Has anyone got this to work? Tried today and nothing was taking.
 
Comment

Alex

MD developer
Staff member
Md
XFtoWP
Messages
6,195
Reaction score
1,745
Hi @Rush, a slight change to my instructions as I just found out the pluggable function method needed a slight tweak.

I just released XFtoWP 1.4 beta 2 that has this tweak, so update your site to use this latest release. From there, you can copy all templates to your child theme folder /wp-content/themes/THEME_NAME/XFWP/comments/comments-list.php to overwrite this particular file.

After that, I was able to make the code I already gave you work to remove the pinned posts so you should be good to go now.
 
Comment
Top