Hello,
How do I change the widget-newspaper-x-posts-c/class-widget-newspaper-x-posts-c.php
file (I believe I need to modify this one) so the section’s title would link to a category that is set in the widget’s options?
Thanks
Hello,
How do I change the widget-newspaper-x-posts-c/class-widget-newspaper-x-posts-c.php
file (I believe I need to modify this one) so the section’s title would link to a category that is set in the widget’s options?
Thanks
Ok,
managed to find a dirty fix myself. For example, let’s take Post Layout type D.
In newspaper-x/inc/libraries/widgets/widget-newspaper-x-posts-d/layouts/default.php
replace the following line:
echo $before_title . esc_html( .$instance['title'] ) . $after_title;
with:
echo $before_title . "<a href='" . get_category_link( get_cat_ID( esc_html( $instance['newspaper_x_category'] ) ) ) . "'>" . esc_html( $instance['title'] ) . "</a>" . $after_title;
Maybe it will be helpful for someone