Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ajay

    (@ajay)

    I’m not sure how exactly WPML works. But, it would be something along the lines of

    If main language then display posts else don’t.

    You’ll need to use the manual install option from the FAQ

    Thread Starter tdebaillon

    (@tdebaillon)

    I assigned different categories for different languages, so, for some other plugins, I test the language and display the right category accordingly:

    if (ICL_LANGUAGE_CODE == 'en') {
    		$my_filter_cat = '4';
    	} else {
    		$my_filter_cat = '5';
    	}

    Is a similar construct (passing a category argument to some function) possible with CRP?

    Plugin Author Ajay

    (@ajay)

    Yes,

    It might be something along the lines of:

    if ((ICL_LANGUAGE_CODE == 'en')&&(function_exists('echo_ald_crp'))) echo_ald_crp();

    Add this just after the_content() of your theme

    Thread Starter tdebaillon

    (@tdebaillon)

    OK,
    If I understand well, I have to directly call ald_crp to be able to filter the result conditionally?
    Except that get_crp takes its arguments from the database, not at runtime, and there is no apply-filter hook available.
    I am afraid I am stuck.

    Plugin Author Ajay

    (@ajay)

    Not sure what you mean by

    Except that get_crp takes its arguments from the database, not at runtime, and there is no apply-filter hook available.

    Are you trying to pass some parameters to CRP based on the language?

    Thread Starter tdebaillon

    (@tdebaillon)

    Yes, my aim is not to display the plugin with certain language only. What I’d like to do is restricting the category to display based on the language used.

    This would require directly passing a category ID (or a range of) to CRP, and filter its output from code, not from initial settings.

    Plugin Author Ajay

    (@ajay)

    I think that is clear to me. The bad news is you can’t do that right now since CRP doesn’t support restricting to a category yet.

    It’s one of the main to-dos in the next version of the plugin. I’ve yet to get some free time to work on the plugin.

    Thread Starter tdebaillon

    (@tdebaillon)

    Too bad…
    Anyway thanks for this great plugin!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Contextual Related Posts and WPML’ is closed to new replies.