johoho Posted August 26, 2022 Report Share Posted August 26, 2022 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..... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.