Site logo

Archived topic

Merch theme single post broken

2 replies · Started by Cheryl on January 26, 2022

Viewing posts 1–3 of 3

Hi,
I'm working on removing Elementor from my website and switching to the Merch layout on a staging site.

The trouble I'm having is with the single post.

The element that shows the post title, excerpt and meta above the featured image is, instead, showing this above the featured image on the front of the site:

term_id ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '' . $separator; } echo trim( $output, $separator ); } the_title( '
', '
' ); if ( has_excerpt() ) : // Only show custom excerpts not autoexcerpts ?>

and in the related posts section this shows on the front:

slug; $list = get_page_by_title( 'related', 'OBJECT', 'wp_show_posts' ); if ( function_exists( 'wpsp_display' ) && is_object( $list ) ) { wpsp_display( $list->ID, 'tax_term="' . $cat_slug . '"' ); } ?>

This is what I have in my Single Post Entry Header element:

<div id="custom-post-entry-header" class="custom-post-header grid-container">		
	<?php
	$categories = get_the_category();
	$separator = ' | ';
	$output = '';
	
	if ( ! empty( $categories ) ) {
		foreach( $categories as $category ) {
			$output .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</a>' . $separator;
		}
		
		echo trim( $output, $separator );
	}
	
	the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' );

	if ( has_excerpt() ) : // Only show custom excerpts not autoexcerpts ?>
		<p class="entry-subtitle"><?php echo get_the_excerpt(); ?></p>
	<?php endif; ?>
</div>

I've been trying to problem-solve what's broken here -- everything else seems fine; it's just the single post that I'm having issues with.

Thanks!
Cheryl

I realized what was causing the issue. I had disallow file edit set and so I was unable to check the execute PHP box in the element settings.
Thanks
Cheryl

Hi Cheryl,

Glad you were able to figure out the issue! Feel free to reach out if you'll need assistance with anything else and we'll gladly be here to help! :)

This archived topic is closed to new replies.