WordPress.org

Ready to get started?Download WordPress

Forums

Recommended Stories for WordPress
Only works partly in 3.4.1 Custom theme (5 posts)

  1. websherpa
    Member
    Posted 1 year ago #

    Great Plug-in, only the options for where the Recommended Stories box should appear (Single Page, Category Page, etc.) does not work properly with 3.4.1.

    Wish it worked fully!

    http://wordpress.org/extend/plugins/recstory/

  2. Richard Vencu
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. websherpa
    Member
    Posted 1 year ago #

    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!

  4. websherpa
    Member
    Posted 1 year ago #

    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.

  5. Richard Vencu
    Member
    Plugin Author

    Posted 1 year ago #

    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');
    		}
    	}
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.