• Hi!

    I am using wordpress as my CMS. My “so-called-blog” contains fairly different categories (Java Programming / Gundog handling). I would like to limit my facebook integration to the gundog part. Is this somehow possible? Limiting the canvas url to the category doesn’t work, a lot of other links are not working when I do this. So I guess I can’t limit to a category just by tweaking the settings. Would it be possible that you build this feature into wpbook?

    My fb app: http://apps.facebook.com/bradys-wts/
    My category of my blog I want to show: http://www.sahlbach.com/category/gundogs/bradys-wts/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Eckman

    (@johneckman)

    This is not a current feature of WPBook, but it is something users have requested.

    You can choose, using the yes/no in the sidebar, not to post specific items to Facebook when they are published, but they will still show in the canvas view.

    In other words, it’s on our list, but not simple to do – you’d have to change the query in the index.php inside wpbook/theme/ to limit by category, and change publish_to_facebook.php to only apply to posts in that category, and also wp-cron.php to only consider those posts for comment import, etc.

    Thread Starter Khoulaiz

    (@khoulaiz)

    Yes, the canvas view is the main problem.

    Ok, consider this post please as a +1 vote for this feature. It would make wpbook even cooler as it is and you my personal hero. 🙂

    No honestly, great plugin, thanks for your support and time. It would just be nice to be able to filter the canvas view.

    Cheers,

    Andreas

    Plugin Contributor B.

    (@bandonrandon)

    You should be able to copy the wpbook_theme folder into wp-content/themes then modify index.php around line 293 you’ll see a fairly normal WordPress loop. Something like:

    if (have_posts()) :
    	      while (have_posts()) :
    	        the_post();....

    change that to

    if (have_posts()) :
    	      while (have_posts()) :
    	        the_post();if ( in_category( 'gundog' )) {
    //rest of loop code here
    } //end category check
    endif; // if have posts

    This requires some knowledge of WP themes and I haven’t tested this particular method but the concept should work. Make sure you have the canvas URL set to the main WP blog page as what we are doing is just hiding all but that category.

    Sources: http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Function_Reference/in_category

    Thread Starter Khoulaiz

    (@khoulaiz)

    Ok, I modified it like you suggests and it seems to work pretty well. The closing } is not before

    endif; // if have posts but before endwhile; // while have posts

    but as you said, the concept works.

    Thanks for your help guys,

    Andreas

    Plugin Contributor B.

    (@bandonrandon)

    @khoulaiz okay after endwhile; makes more sense I just did a quick look over the code and guessed without testing it 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: WPBook] Limit FB integration to certain category’ is closed to new replies.