• Q and A FAQ and Knowledge Base for WordPress 1.0.6.2
    NextGEN Gallery by Photocrati 2.0.33

    When Q and A is Active the NextGEN Gallery doesn’t work. There is a shortcode conflict. As soon as I disable Q and A, NextGEN works again.

    I have experienced this with at least one other site. Is this a known issue? Is so, is there a solution?

    Thank you,

    Chad

    https://www.ads-software.com/plugins/q-and-a/

Viewing 2 replies - 1 through 2 (of 2 total)
  • rgecko

    (@rgecko)

    Any insight on this?

    I’m not having a problem with NextGEN on most of my site, only on pages that display the Q and A. Seems to be some conflict with the shortcodes.

    Specifically, if I try to put a singlepic (which uses shortcode) on the same page that I use the [qa] shortcode, the photo shortcode shows up instead of the photo.
    If I display a thumbnail instead, the thumbnail shows up, but doesn’t open properly with a lightbox when clicked.

    Help?

    hey guys,
    I had the same problem too, and to fix this issue I had to modify some of the shortcodes.php code to avoid the conflict.

    /wp-content/plugins/q-and-a/inc/shortcodes.php

    Where it’s writing out the answer to the question,
    apply_filters( ‘the_content’, get_the_content());

    whenever you run it through the filter, it breaks, so I had to instead run it through a custom function to avoid this:

    nl2p(get_the_content());

    function nl2p($str) {
    $arr=explode(“\n”,$str);

    for($i=0;$i<count($arr);$i++) {
    if(strlen(trim($arr[$i]))>0)
    $out.='<p>’.trim($arr[$i]).'</p>’;
    }
    return $out;
    }

    And now it all works… Does this help? Let me know.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘NextGEN Gallery Conflict’ is closed to new replies.