Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gergov

    (@gergov)

    up.

    Hey there gergov. I’ve resolved this issue here: http://jondaydesign.net/web-design-and-development/blog/integrate-qtranslate-with-wp-subtitle-and-woocommerce/

    Basically, you just need to change the method by which you echo the subtitle. Instead of <?php the_subtitle(); ?>, you will first want to obtain the subtitle from the post meta, and localize that string using __(). You will want to pass this string into a variable first, and then echo that variable (probably not necessary, but did not work for me otherwise in my scenario).

    $s = __(get_post_meta(get_the_ID(), 'wps_subtitle', true));
    echo $s;

    This should take care of the problem for you. This will go in the template file for the section of the site that you want the subtitle to appear, replacing <?php the_subtitle(); ?> (which I’m assuming you’ve likely placed in the file(s)). So, for example, a single post would be in single.php.

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

The topic ‘Qtranslate WP Subtitle’ is closed to new replies.