Generated posts from WordPress-Plugin show empty links in menu

My colleague and I are working on a WordPress-Plugin that generated posts using a custom post type. It all work’s fine until You look at the posts. The generated pages look good and use the Themes single.php template. The only problem is, that the menu, that works on all other pages of the site is empty on the pages generated by the plugin.
By empty I mean that the structure including links is there, just the text inside the <a> tags.

The generated menu on a post generated by the plugin looks like this

Read More
<nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
    <div class="nav-menu">
        <ul>
            <li class="page_item page-item-1763">
                <a href="?page_id=1763"></a>
            </li>
            <li class="page_item page-item-1761">
                <a href="?page_id=1761"></a>
            </li>
            [...]
        </ul>
   </div>
</nav>

For all other pages, the menu looks like this:

<nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
    <div class="nav-menu">
        <ul>
            <li class="page_item page-item-1763">
                <a href="?page_id=1763">About</a>
            </li>
            <li class="page_item page-item-1761">
                <a href="?page_id=1761">Galerie</a>
            </li>
            [...]
        </ul>
    </div>
</nav>

As You can see, the only difference is that there is no text between the <a> and </a> tags, which makes the menu unusable.

We really have no idea of how the plugin / custom-post-type creates this issue, as we tried this with different themes, and they all behave the same – so it is not an issue with the theme.

Any comment or hint that points in the right direction is greatly appreciated.

Related posts

Leave a Reply