• Resolved babouz44

    (@babouz44)


    Hi,
    I have an error in my custom post type archive page…
    On this page there are 3 articles shown.
    When I edit on of them and add content with “Page Builder” there is no problem. But when I edit a second article and add content with Page builder, on front, the archive description is replace by the content of the second article…

    This is the code I use to show the archive desc :
    <?php the_archive_description( '<div class="taxonomy-description container">', '</div>' );?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter babouz44

    (@babouz44)

    I changed this line in your plugin :
    $description = apply_filters( 'the_content', $post_type_description );
    by
    $description = apply_filters( 'the_excerpt', $post_type_description );

    and it works now

    Plugin Author mrwweb

    (@mrwweb)

    I’m glad you were able to find a way to solve your problem. However, I suspect that this didn’t really fix any underlying issues and changing the filter to the_excerpt may introduce a new problem.

    It sounds like your page builder plugin is filtering the_content and colliding with this plugin. I would have them take a look at this to understand what’s going on here. For anyone reading this thread, I do not recommend you make this change (or ever hack plugin files).

    Thread Starter babouz44

    (@babouz44)

    Hi Mark,
    well I know it’s certainly not the best way to resolve the probleme but I had to find a way… I hope there will have a better solution found, or there will have an update of page builder that could resolve it, but for the moment, this is the only way I found to achieve this…

    Plugin Author mrwweb

    (@mrwweb)

    I’d still recommend you run this issue by the theme developer, as I suspect it’s more an issue on that end.

    Thread Starter babouz44

    (@babouz44)

    Well it’s my own theme ??
    I don’t see where the problem could be… Is there some specific param to do with the custom taxonomy ?

    here is mine :

      // Initialize New Taxonomy Labels
      $labels = array(
        'name' => _x( 'Catégories emplois', 'taxonomy general name' ),
        'singular_name' => _x( 'Catégorie', 'taxonomy singular name' ),
        'search_items' =>  __( 'Rechercher' ),
        'all_items' => __( 'Toutes les catégories' ),
        'parent_item' => __( 'Catégorie parente' ),
        'parent_item_colon' => __( 'Catégorie parente :' ),
        'edit_item' => __( 'Editer la catégorie' ),
        'update_item' => __( 'Mettre à jour' ),
        'add_new_item' => __( 'Ajouter une catégorie' ),
        'new_item_name' => __( 'Nouveau nom de catégorie' ),
      );
        // Custom taxonomy for Project Tags
        register_taxonomy('category_emploi',array('emploi'), array(
        'hierarchical' => false,
        'labels' => $labels,
        'show_ui' => true,
        'query_var' => true,
    	'show_admin_column' => true,
    	'show_in_nav_menus' => true,	
        'rewrite' => false
      ));

    and here is my archive-emploi.php :

    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<main id="main" class="site-main">
    
    		<?php if ( have_posts() ) : ?>
    
    			<header class="page-header">
                <h1 class="page-title"><?php post_type_archive_title(); ?></h1>
    				<?php
    					the_archive_description( '<div class="taxonomy-description container">', '</div>' );
    				?>
    			</header><!-- .page-header -->
    
    			<?php /* Start the Loop */ ?>
                    <div class="entry-content"> 
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
    
    			<?php endwhile; ?>
               
                    </div><!-- .entry-content -->
    
    		<?php else : ?>
    
    			<?php get_template_part( 'template-parts/content', 'none' ); ?>
    
    		<?php endif; ?>
    
    		</main><!-- #main -->
            
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>
    
    Plugin Author mrwweb

    (@mrwweb)

    Template looks fine. Thanks for including that.

    In rereading the description of the original problem, I’m still not quite sure I understand it. Is there any way you could share a link to the problem page? You might also file a report with whatever page builder plugin you’re using. It’s odd that it would take over multiple parts of an archive page.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bug with Page Builder and archive desc’ is closed to new replies.