Search by Category

Update #1 Toggle Feature Added

I have finished building the new update for Journal It. You can now toggle whether you want to see all posts or just main posts that begin a new thread. To use this feature head to the home page and use the toggle above the post feed.

(The Tech Stuff)
This was a relatively simple plugin to build. First, I made a toggle out of an html checkbox using CSS. I added a new class called child-post to all post children. This was the most tricky part because I had to use the WordPress filter called 'post_class' to loop through all posts and find the posts that had parents with 'if ($post->post_parent != 0)' . After that, I used JavaScript to show and hide child posts based on whether the toggle was checked.

Return to Main Thread

Continued

You must login or register to submit a post...

Leave a Reply

Your email address will not be published. Required fields are marked *