Jump to content
php.lv forumi

Wordpress, Polylang


johoho

Recommended Posts

Sveiki!

Mēģinu uztaisīt vienkāršu pluginu kurš ģenerē XML ar visiem ierakstiem.
Ir 3 valodas un izmanto Polylang.
 
Mēģinu dabūt visus ierakstus:
             $investments = get_posts( array(
             'numberposts' => -1,
              'post_type'   => 'investment',
              ) );

            foreach( $investments as $post ){
                setup_postdata( $post );
echo '<post>
                    <ID><?php the_ID(); ?></ID>
                    <Title><?php the_title(); ?></Title> ...........
 
 
Kā var dabūt to pašu title citās valodās? 
<Title_ee>...</Title_ee>
<Title_lt>...</Title_lt>
utt.?
 
Vienkārši <?php pll_the_languages();?>
nestrādā, parādās kļūda There has been a critical error on this website.....
 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...