I need php expert to help me

<%= @topic_view.topic.title %>
<%= @topic_view.topic.average_rating %> <%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %>

code added in template-hooks.php (WordPress theme), only showing on pages but it categories it’s not appearing…

???

@template-hooks.php

where should i add this in order to show also in categories? because currently, it only visible in pages. When I click Categories menu, the “” are not showing.

/**
	 * This function display page title.
     *
     * @uses presscore_config()
     * @uses presscore_is_post_title_enabled()
     * @uses presscore_is_content_visible()
     * @uses presscore_get_page_title_wrap_html_class()
     * @uses presscore_get_page_title_html_class()
     * @uses presscore_get_page_title()
     * @uses presscore_get_page_title_breadcrumbs()
	 */
	function presscore_page_title_controller() {
		$config = presscore_config();

		if ( ! ( $config->get( 'page_title.enabled' ) || $config->get( 'page_title.breadcrumbs.enabled' ) ) ) {
			return;
		}

		$show_page_title = ( presscore_is_post_title_enabled() && presscore_is_content_visible() );
		if ( ! $show_page_title ) {
			return;
		}

		$page_title_wrap_attrs = '';
		$parallax_speed = $config->get( 'page_title.background.parallax_speed' );
		if ( $parallax_speed ) {
			$page_title_wrap_attrs .= ' data-prlx-speed="' . $parallax_speed . '"';
		}
		?>
		<div <?php echo presscore_get_page_title_wrap_html_class( 'page-title' ), $page_title_wrap_attrs; ?>>
			
			 <!--<div class="wf-wrap">-->

				<?php
				// get page title
				if ( $config->get( 'page_title.enabled' ) ) {
					
					/*$page_title = '<div class="page-title-head hgroup"><h1 ' . presscore_get_page_title_html_class() . '>' . presscore_get_page_title() . '</h1></div>';*/
					
					/*$page_title = '<div class="announcement_title">جديد الموقع <i class="fas fa-rss"></i></div><div class="announcement"><marquee behavior="scroll" direction="right" onmouseover="this.stop();" onmouseout="this.start();">هو فضيلة الشيخ عبدالله بن صلفيق القاسمي الظفيري من أهالي حفر الباطن</marquee></div>';*/
					
$page_title = '<section id="xxx" class="widget widget_text">
	<div class="custom-widget-title" style="background: #E0E0E0; font-size: 1.3em; border-right: 5px solid #38200B; float: right; padding: 0 5px;"><i class="fas fa-rss"></i> إعلانات</div>
		<div class="textwidget">
			<div id="mtphr-dnt-615" class="mtphr-dnt mtphr-dnt-615 mtphr-dnt-default mtphr-dnt-rotate mtphr-dnt-rotate-fade">
				<div class="mtphr-dnt-wrapper mtphr-dnt-clearfix">
					<div class="mtphr-dnt-tick-container">
						<div class="mtphr-dnt-tick-contents">
						
				<!--Beginning of Announcement Content-->
<div class="mtphr-dnt-tick mtphr-dnt-default-tick mtphr-dnt-clearfix "><a href="https://www.aldafiri.com/announcementpage/">درس جديد خلال شهر رمضان: فضائل القرآن من صحيح البخاري</a></div>
<div class="mtphr-dnt-tick mtphr-dnt-default-tick mtphr-dnt-clearfix ">This is an Announcement No. 2</div>
<div class="mtphr-dnt-tick mtphr-dnt-default-tick mtphr-dnt-clearfix ">This is an Announcement No. 3</div>
<div class="mtphr-dnt-tick mtphr-dnt-default-tick mtphr-dnt-clearfix ">This is an Announcement No. 4</div>
<div class="mtphr-dnt-tick mtphr-dnt-default-tick mtphr-dnt-clearfix ">This is an Announcement No. 5</div>
				<!--End of Announcement Content-->
				
				</div>
			</div>
		</div>
	</div>
</div>
</section>';
					/*$page_title = '<img src="/wp-content/themes/dt-the7-child/img/banner.jpg" class="header-banner" />';
					$page_title = '&nbsp;';*/
				} else {
					/*$page_title = '';*/
				}
				/*$page_title = apply_filters( 'presscore_page_title', $page_title );*/

				// get breadcrumbs
				if ( $config->get( 'page_title.breadcrumbs.enabled' ) ) {
					/*$breadcrumbs = presscore_get_page_title_breadcrumbs();*/
				} else {
					/*$breadcrumbs = '';*/
				}

				// output
				if ( 'right' == $config->get( 'page_title.align' ) ) {
					echo $breadcrumbs, $page_title;
				} else {
					echo $page_title, $breadcrumbs;
				}
				?>
			</div>
		<!--</div>-->

I haven’t gone beyond wordpress 3.x, but categories and tags were for Posts only, not Pages. At the very least it would have to be enabled for Posts the same way it is enable for pages. Also I’m not familiar with presscore.