Changing order of plugin output on single post
Don’t you hate it when people who have no idea what they are doing, give you instructions to do something they don’t even know is right? Yeah me too, but since this is my site and I’m using it as a reference for myself, you might want to ignore this post because I have no idea what I’m doing yet I just changed something on my site and it worked, but don’t ask me to explain why cos I don’t know. :)
I wanted to change the order of the output on a post.
The screenshot above shows the “before” – there are 3 plugins in specific that I needed to change the output of the order:
- Comment Link Suggest-O-Tron – currently at top, I want it at the bottom
- nRelate Related Content – currently in the middle, which is fine
- Document Feedback – currently at the bottom, but I want it “before” the related content
These 3 plugins were all placed in the above order after my post and before my comments.
But what I wanted is:
- Document Feedback
- nRelate Related Content
- Comment Link Suggest-O-Tron
None of the plugins have any options to change the order.
I found this article from nRelate (the only one that I don’t really need to move) but it helped me achieve my goal by figuring out how to change the others – but like I said at the beginning of the article, I have no idea what I’m doing here, I’m just guessing and happened to stumble upon something that worked for me, but who knows what trouble this might bring to me at a later time ;)
So, taking “my” understanding of the logic behind the commands on that article, I created my own for the plugins that I actually wanted to move.
I went into the plugins > edit section and looked at the code of Comment Link Suggest-O-Tron, hunting for “the_content” and looking for anything related to the numbers to try and grab the correct wording to change my theme functions file. Then I created my own from it:
I put those 3 codes at the bottom of my Theme Functions (functions.php)
And by golly, it did exactly what I wanted it to do.
Use at your own risk.
Or better yet, if you know HOW I “should’ve” done it, please let me know. I’d also like to figure out how to put something beneath the comments if possible, if anyone out there knows how to do that?