Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Redsand747

    (@redsand747)

    Hi Brecht,

    Awesome! I had totally missed the ability to increase the number of search results ?????♂?, which has ended up working perfectly. Once I set it to 12, I was able to see the “missing” post, so for some reason it’s not matching as readily as I would have expected.

    From now on, I’ll just increase that number until the posts show and drop it back down to three when I’m not actively searching for articles to relate.

    Thanks so much for the reply.

    All the best,
    Jon

    Thread Starter Redsand747

    (@redsand747)

    Ok, almost exactly what I needed ??

    Will be a great update for your plugin. Thanks again for all the help.

    Thread Starter Redsand747

    (@redsand747)

    Hey Harish,

    I’ll be happy to leave a review, thanks for asking. Here’s the updated page:

    https://takelessons.com/blog/test-page-test-page

    Unfortunately it’s showing a lot of posts that aren’t using I Recommend This.

    Is it possible to limit the posts by post category OR simply to eliminate any post that has “0” recommendations?

    Thanks!
    Jon

    Thread Starter Redsand747

    (@redsand747)

    Perfect!! Works like a charm.

    If I want to display posts from anytime in 2014 would I update the short code as follows?

    [dot_recommended_posts container=’div’ post_type=’showcase’ number=’10’ year=’2014′]

    Just removing the “monthnum” from the short code.

    Thanks!
    Jon

    Thread Starter Redsand747

    (@redsand747)

    Hey Harish,

    The top 10 content is a general blog post… didn’t think that was a variable I could change. Can it show top 10 general blog posts?

    Thanks for your reply!

    All the best,
    Jon

    Thread Starter Redsand747

    (@redsand747)

    Hey Gabriel,

    As you may have guessed I don’t have experience with PHP code, which is why I submitted the topic. I can get by with HTML and CSS, but that’s about it.

    As it stands the code isn’t doing anything on my page. I was hoping if I could show what I was attempting to do, you or someone else might be able to help point me in the right direction. I had tried a bunch of different things including wrapping the code snippet (which I assumed would display the users rank) with the <?php ?> tags, but it I was getting the same result… nothing would display.

    The following code snippet had been pulled from last large block of code in this tutorial that you wrote, but to be honest I was pulling a snippet from your code example with my fingers crossed that it was the right code and I was inserting it in the right spot to display a users rank in the comments.

    // Insert rank title
    					if ( $comment->user_id != 0 )
    						echo '<div class="fn authors-rank" style="margin-left:6.071428571rem;">Rank: ' . mycred_get_users_rank( $comment->user_id ) . '</div>';

    Ultimately, that’s my goal… getting a users rank to display under their name in the comments section.

    I had achieved a similar result in my bbPress forum adding the code snippet that you suggested in this thread to my functions.php, and it worked like a charm.

    I’m open to any way I can get the myCRED rank title to display in the comments section ??

    Appreciate all your time.

    All the best,
    Jon

    Thread Starter Redsand747

    (@redsand747)

    Hey Gabriel,

    Thanks for the reply. I had tried inserting it into the following location as well as a few other spots to try and see if I could get it to display, but no luck.

    Here’s the code:

    <!-- display the comment -->
                <div class='comment_content'>
                    <header class="comment-header">
                        <?php
                        $author = '<cite class="comment_author_name"'.avia_markup_helper(array('context' => 'author_name','echo'=>false)).'>'.get_comment_author().'</cite>';
                        $link = get_comment_author_url();
                        if(!empty($link))
                            $author = '<a href="'.$link.'" '.avia_markup_helper(array('context' => 'comment_author_url','echo'=>false)).'>'.$author.'</a>';
    
                        printf(__('<cite class="author_name heading"'.avia_markup_helper(array('context' => 'comment_author','echo'=>false)).'>%s</cite> <span class="says">says:</span>'), $author) ?>
                        <?php edit_comment_link(__('(Edit)','avia_framework'),'  ','') ?>
    
    // Insert rank title
    					if ( $comment->user_id != 0 )
    						echo '<div class="fn authors-rank">Rank: ' . mycred_get_users_rank( $comment->user_id ) . '</div>';
    
                        <!-- display the comment metadata like time and date-->
                            <div class="comment-meta commentmetadata">
                                <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
                                    <time <?php avia_markup_helper(array('context' => 'comment_time'));?>>
                                        <?php printf(__('%1$s at %2$s','avia_framework'), get_comment_date(),  get_comment_time()) ?>
                                    </time>
                                </a>
                            </div>
                    </header>

    Good call on the styling. I removed that just to be sure.

    As for being registered and logged in I double checked this. This user has points from myCRED as a registered user and when I’m commenting it says “Logged in as Redsand747,” so I think that’s correct.

    The file I’m editing is called loop-comments.php, but to be honest I’m not sure I’m inserting the necessary piece of code inside the comment loop as you mentioned… I’m just plopping it in between the code that appears to be displaying the comment authors name and the timestamp.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)