Site logo

[Support request] Display categories and tags on single blog post page via elements hook

Home Forums Support [Support request] Display categories and tags on single blog post page via elements hook

Home Forums Support Display categories and tags on single blog post page via elements hook

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1822770
    Maike

    Dear Generatepress team,
    I have no programming experience with PHP, so here the question and it would be nice if you could help me with a php snippet: I took a very well-functioning hook from one of your templates for “generate_before_left_sidebar_content”.

    <div class="author-box">
    	<div class="avatar">
    		<?php 
    		global $post;
    		$author_id = $post->post_author;
    		echo get_avatar( $author_id );
    		?>
    	</div>
    	<h5 class="author-title">
    		<?php printf( esc_attr__( '%s', 'the author' ), get_the_author_meta( 'display_name') );?>
    	</h5>
    	<div class="author-summary">
    		<p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p>
    	</div>
    </div>

    I would like to display the assigned categories and tags of the blog post directly underneath in this left sidebar. So far, they are displayed directly below the blog post text – this should be removed.

    Thank you very much

    #1822833
    David
    Staff
    Customer Support

    Hi there,

    are you using the Block Editor ? As you could create the entire layout using a Block Element.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.