Support » Plugin: Recommended Stories for WordPress » [Plugin: Recommended Stories for WordPress] Only works partly in 3.4.1 Custom theme

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Richard Vencu

    (@rvencu)

    I am not sure what is not working, in my several installations it works properly. Please give me more details maybe a link to your site to check.

    The test site is located here: dev.thelitigator.ca

    The Plugin installed without an issue, but for some reason its parameters to filter which templates it appears on do not connect up with our theme.

    When I get a chance, I’ll try re-installing a default theme to see if it works for us there.

    Our custom theme is fairly complex.

    Thank you!

    Details. Interestingly, if I deselect all “Where to display the animated box” options, then the animated box won’t appear.

    If I select “Display on single pages only”, “author’s pages” “tags” or “search pages” then it displays on the corresponding correct pages and not elsewhere, the way it is supposed to.

    If I select “Display on frontpage,” “archives pages” or “category pages”, then it displays on every page. These are the most heavily modified custom templates.

    Plugin Author Richard Vencu

    (@rvencu)

    Well, here is the function that decides to display the box or not.

    I am using the normal WordPress conditional tags, you should check somehow if the conditional tags are working properly in your modified templates.

    Most problems seem to appear when you have more (nested) loops…

    function recstory_displayon() {
    	global $blog_id;
    	global $post;
    	global $postID;
    
    	$postID = $post->ID;
    	$singular = 0;
    
    	/* Read options */
    	if (is_multisite())
    		$recstory_options = get_blog_option($blog_id , 'recstory_options');
    	else
    		$recstory_options = get_option('recstory_options');
    
    	if ( is_singular() ) {
    		$singular = 1;
    		if (get_post_meta($post->ID, 'recstory_exclude', true))
    			$singular = 0;
    	}
    
    	if ( ( $recstory_options['loggedin'] == 1 && is_user_logged_in() ) || $recstory_options['loggedin'] == 0) {
    		if ( ( $recstory_options['singular'] == 1 && $singular == 1 && !is_front_page() ) ||
    		( $recstory_options['frontpage'] == 1 && is_front_page() ) ||
    		( $recstory_options['search'] == 1 && is_search() ) ||
    		( $recstory_options['archive'] == 1 && is_archive() ) ||
    		( $recstory_options['category'] == 1 && is_category() ) ||
    		( $recstory_options['author'] == 1 && is_author() ) ||
    		( $recstory_options['tag'] == 1 && is_tag() )
    		) {
    			add_action('wp_footer','recstory_load');
    			add_action('wp_footer', 'recstory_box');
    		}
    	}
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Recommended Stories for WordPress] Only works partly in 3.4.1 Custom theme’ is closed to new replies.