WPML custom archive page

Hi,
I know this is outside of your scope of support.
But im hoping since im a good customer I would maybe get some insights.

Im trying to use the WPML and everything is going great except for custom archive pages.

I have a custom archive page inside pro-child folder called “archive-byggdir.php”
inside the file I have this:

<?php
// =============================================================================
// VIEWS/INTEGRITY/WP-INDEX.PHP
// -----------------------------------------------------------------------------
// Index page output for Integrity.
// =============================================================================
?>

<?php get_header(); ?>
  <div class="x-container max width offset">


    <div class="offset cf">
      <div class="<?php x_main_content_class(); ?>" role="main">
		<div class="entry-wrap">
			<ul>
			    <?php
			    wp_list_pages( array(
			    	'post_type'=>'byggdir',
			        'title_li'    => '',
			        'show_date'   => 'modified',
			        'date_format' => $date_format
			    ) );
			    ?>
			</ul>
		</div>
      </div>

      <?php get_sidebar(); ?>

    </div>
  </div>

<?php get_footer(); ?>

This lists all pages from the post_type “byggdir”
anyway…
the problem is I get no content inside entry-wrap when I go to https://domain.com/byggdir/?lang=en
But everything is fine if I go to https://domain.com/byggdir/

so the wp_list_pages is the problem I guess because If I write asdfasdfasdf into the file I can see that on the front end…
But the wp_list_pages is not showing anything.

Hey @Baroninn,

Thank you for being a good customer. However, it’s only the WPML support who can answer your question as they are experts in terms of WPML functions you can use in relation to WordPress functions.

WPML support said the same to me. Did not want to help in any way… sad… but I understand.

But… I was able to resolve this on my own. it was kind of a stupid solution and I should not need support for this easy stuff.
But I will leave the solution here in case anyone stumbles upon this searching.

Solution:
I noticed that the Custom post type only had one language.
So I duplicated all pages over to the secondary language inside “Translation Management”.
And voila ! everything is working perfectly.

spent hours trying all sorts of custom php codes. haha. and in the end it was pretty easy using the duplicator inside WPML.


Oh, I also want to say what a great job you guys have done to integrate PRO and X to WPML. Specially inside cornerstone… Its revolutionary.
Thanks for being awesome.

Hey @Baroninn,

We’re glad that you’ve sorted it out.

I just want to let you know that it’s not that we don’t want to help. It’s really not feasible for product support staff to be dealing with customizations and third-party plugins.

For this case, because I’m not an expert with WPML functions and options, if I’ve investigated that, it would have taken me hours to crack down too and that would be spending custom development time rather than time devoted for product support which all our customers deserve regardless of license numbers. I hope you understand our position too.

And, thank you for your kind words about our products.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.