THE SHOP THEME BLOG Content Text


#1

Hi

Is it possible to make the whole blog clickable (content text of blog) and not just the title of the blog?

thanks


#2

Hi,

Please post a link to your site, so we can check.

Best Regards,
Csaba


#3

my site isnt live yet iam running it on my localhost


#4

Hi,

You can make the content text anchor ( linked to the post ) by adding this code to template-parts / content.php, line 31:

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">

in front of this code: <div class="entry-content">

and the ending anchor tag </a> to line 44, between &lt;/div&gt; <code>and</code>&lt;!-- .entry-content --&gt;,

so the full code from line 31 to 44 ( these line numbers can be different from version to version ) at the end will have to look like this :

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><div class="entry-content">
			<?php if ( (get_theme_mod('full_content_home') == 1 && is_home() ) || (get_theme_mod('full_content_archives') == 1 && is_archive() ) ) : ?>
				<?php the_content(); ?>
			<?php else : ?>
				<?php the_excerpt(); ?>
			<?php endif; ?>

			<?php
				wp_link_pages( array(
					'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'theshop' ),
					'after'  => '</div>',
				) );
			?>
		</div></a><!-- .entry-content -->

Please let me know how it works.

Best Regards,
Csaba


#5

Hi Csaba

That works perfectly, thanks very much for the help.

Thanks

Paul


#6

Hi,

Great! You’re most welcome! If you need help with anything else, please, feel free to open a new topic.

Have a nice day!

Best Regards,
Csaba