Post count: 6richardmathisMay 21, 2016 at 6:37 am #20354
Hello on my site, https://dorksidecookies.net/
I wanted the Latest News to help promote our blog posts, comics, and reviews equally.
I successfully modified the ajax-response.php to include comics and reviews like so
$statement = array(
‘post_type’ => array(‘post’,’comic’,’review’),
‘post_status’ => array(‘publish’),
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
‘posts_per_page’ => $perload,
‘paged’ => $page
I have 2 questions.
1) How do I prevent my update from being lost in future updates, should I have done this change differently?
2) Non-posts don’t have their category on the Latest News, they just show a blank where the category would go. Can I either make categories show up for the edit screens on reviews so i can set it, or is there a place I can customize the output for the sidebar so I can add some alternate text?Post count: 2679RaiMay 23, 2016 at 2:12 am #20371
- For this kind of customization we highly recommend to use child theme, so you can safely update theme without loosing your customization.
- Custom post type (non-post) have their own taxonomies, different with default post category. You can use to display certain taxonomy (category for non post). You can check function
jeg_review_feed_do_query()for example how to display review category. Please refer to this documentation for details: https://developer.wordpress.org/reference/functions/get_the_terms/
Thank youPost count: 6richardmathisMay 23, 2016 at 3:40 am #20382
Boom! Done. I moved my code to the child theme, then I modified the jeg_feed_do_query feed to do a lookup based on review (copying your jeg_review_feed_do_query) and making my own for webcomics.
Now my homepage is promoting all content we’re producing equally! https://dorksidecookies.net/
Thank you, your tips were enough to lead me in the right direction.Post count: 2679RaiMay 23, 2016 at 3:54 am #20383
You’re welcome! Good luck with your website 🙂
You must be logged in to reply to this topic.