Support » Fixing WordPress » qtranslate/offset problem

  • Resolved timduncan



    I am making this home page which is showing 4 excerpts (3 posts + 1 page excerpt.) The page is using qtranslate.
    In order to show the posts I am setting an offset.

    My problem: if I echo the title/the excerpt, I am getting them at the same time, in both languages I’m using (es, ca). I found this


    which is getting the curent language. but when I have to echo the “read more” link, i am getting the permalink for the previous post.
    Hmmm…i think it’s easier to show the code

    <div class=”column-post_down”>
    <?php $posts = get_posts(‘cat=7&numberposts=1&offset=1’); foreach ($posts as $post) : start_wp(); ?>
    <h2 class=”icon-2″><?php the_title(); ?></h2>

    <?php the_excerpt(); ?>
    <?php echo twentyten_continue_reading_link(); ?>

    <?php endforeach; ?>
    </div><!– column –>

    <div class=”column”>
    <div class=”column-post_up”>
    $page_id = 9;
    $page_data = get_page( $page_id );
    <h2 class=”icon-3″><?php echo wp_specialchars(qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($page_data->post_title)); ?></h2>

    <p><?php echo wp_specialchars(qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($page_data->post_excerpt)); ?></p>
    ” > <?php ?>


    do you have any idea how to echo the title, excerpt and “read more” link, of a selected page, by ID?

    thank you in advance.

  • The topic ‘qtranslate/offset problem’ is closed to new replies.