Home User profile
tagDiv Member
Former Web Developer and Designer for Perk.com Canada. Now working for Vidyard. While working at Perk I built http://esportsedition.com and http://freshmilk.com using the Newspaper theme. I love this theme and the API it provides!
PkChris
tagDiv Member

Thanks! It’s a really fun theme to work with. 🙂

PkChris
tagDiv Member

Thanks for the reply, I ended up figuring it out. I’m the dev in charge of making custom modifications to the theme for my company but I thought I’d ask here first just in case there was an easy way.

PkChris
tagDiv Member

I was following these steps when I got the errors. I think it has to do with the latest version of Revolution Slider being incompatible with the demo content. I’m using the latest version of the Newspaper theme which comes with the latest version of Revolution Slider.

  • This reply was modified 9 years by PkChris.
PkChris
tagDiv Member

Thanks for pointing me in the right direction! I’m an experienced PHP and JS developer so I’ll see what I can do. I’ll post back here if I end up finding an easy solution.

PkChris
tagDiv Member
PkChris
tagDiv Member

I figured it out!! I created my own custom live filter called ‘cur_post_same_categories_no_tags’ and added it to the live filter switch statement in ‘td_data_source’

My custom filter looks like this:


case 'cur_post_same_categories_no_tags':

    $tags = wp_get_post_tags($live_filter_cur_post_id);
    if ($tags) {
        $taglist = array();
        for ($i = 0; $i <= 4; $i++) {
            if (!empty($tags[$i])) {
                $taglist[] = $tags[$i]->term_id;
            } else {
                break;
            }
        }
        $wp_query_args['category__in'] = wp_get_post_categories($live_filter_cur_post_id);
        $wp_query_args['tag__not_in'] = $taglist;
        $wp_query_args['post__not_in'] = array($live_filter_cur_post_id);

        //print_r($wp_query_args);
        //die;

    }
    break;

Then I just changed my previous code to select my new filter:


function related_posts($force_sidebar_position = '', $cur_post_same_categories_no_tags = false) {
blah, blah
    if ($cur_post_same_categories_no_tags === true) {
        $td_related_ajax_filter_type = 'cur_post_same_categories_no_tags';
    }
blah, blah

Hope this helps anyone else who wants to make a bunch of different related article boxes! 😀

Viewing 6 posts - 1 through 6 (of 6 total)