I have to get specific page content (like page(12))

I used that :

  <?php $id=47; $post = get_page($id); echo $post->post_content;  ?>

Work nice execpt for compatibility with qtranslate it return french and english text

But the loop is fine, return only the good language version

<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div id="post">
<?php the_content(); ?>
</div> <!-- .post -->

So the question…. HOW to get a specific page content insite the loop…

4 s
4

Just to clarify:

You mixed two things here. qTranslate stores the different languages in the same post. If you call get_content(), $post->content or an other direct query, you will get the whole content with all different languages from the database.

What qTranslates do, it creates a filter-hook which is attached to the_content hook. If somebody call the_content() in a page template, all other languages will be filtered out.

So you’re right. To filter the other languages, you have to apply the filter-hook the_content to your output.

Leave a Reply

Your email address will not be published. Required fields are marked *