WordPress.org

Ready to get started?Download WordPress

Forums

correct site_url impact in template (1 post)

  1. kamu_lhr
    Member
    Posted 1 year ago #

    Hi All!

    I want to put a 2 language link into my theme's header with qtranslate plugin

    My problem is the link, because of

    <a href="<?php qtrans_convertURL( site_url('/') ); ?>?p=485"><?php _e("<!--:de-->...blah-blah-blah!<!--:--><!--:en-->blah2-balh2-balh2<!--:-->"); ?></a>

    the link is working both of the language but only on the homepage

    if i'm on a different page the link looks like this and get an error of course page not found

    http://mysite.com/differentpage?p=485
    or
    http://mysite.com/en/differentpage?p=485

    Would it any page I stand on, the link has to be

    http://mysite.com/?p=485
    or
    http://mysite.com/en/?p=485

    could you please help me how to do this??

Topic Closed

This topic has been closed to new replies.

About this Topic