• Welcome to the official support community for the Marketers Delight WordPress theme. Most content here is private and to ask questions, get official support, and network with other WordPress users please register and verify your forum account to start posting today.

No pinned post and Users

Rush

Member
Messages
17
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
Messages
5,841
Reaction score
1,639
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
Messages
17
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

Alex

MD developer
Messages
5,841
Reaction score
1,639
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
Top