Category image links
Hi, please go to wp-content/plugins/categories-for-anspress/theme/categories.php and replace line 28:
<?php echo ap_get_category_image($category->term_id); ?>
with this:
<a class=”ap-cat-image” target=”_blank” href=”<?php echo get_category_link( $category );?>”><?php echo ap_get_category_image($category->term_id); ?></a>
and line 32:
<a class=”term-title” href=”<?php echo get_category_link( $category );?>”>
with this:
<a class=”term-title” target=”_blank” href=”<?php echo get_category_link( $category );?>”>
then go to wp-content/plugins/categories-for-anspress/categories-widget.php and replace lines 34 and 35:
<a class=”ap-cat-image” href=”<?php echo get_category_link( $category );?>”><?php echo ap_get_category_image($category->term_id); ?></a> <a class=”ap-cat-wid-title” href=”<?php echo get_category_link( $category );?>”>
with this:
<a class=”ap-cat-image” target=”_blank” href=”<?php echo get_category_link( $category );?>”><?php echo ap_get_category_image($category->term_id); ?></a> <a class=”ap-cat-wid-title” target=”_blank” href=”<?php echo get_category_link( $category );?>”>
GOOD LUCK
Lucas Atkins commented
Wait, nvm it worked!! When I copied the code the ” were messed up in my Brackets editor lol. Thank you!
morteza commented
Add ( target=”_blank” ) before ( href ) in all places you want.
I updated my answer, please replace codes and then vote up & select my answer 🙂
morteza commented
Yes of course! 🙂
Almost works! But it appends the link to existing URL… so it refreshes page as: https://n4bb.com/forums/categories/“https://n4bb.com/forums/category/general-tech-discussion/”