Add New > paste this code WITHOUT the first line " Run everywhere > Save & Activate. * - OR child theme functions.php: paste at the bottom (keep the " true, // true = use this design on ALL posts automatically // false = only use the shortcode [tm_single_post] (for an Elementor Pro "Single Post" template) 'sidebar' => true, // right sidebar (latest posts + categories) 'comments' => false, // show the comments area 'related' => 3, // number of related posts 'accent' => '#1eaaf1', // links / hover / progress bar colour 'badge' => '#e03545', // category badge colour ); } /* ==================================================== */function tps_is_target() { return is_singular( 'post' ) && ! isset( $_GET['elementor-preview'] ); }/* ---------- CSS (only on single posts) ---------- */ function tps_css() { return ' .tps{--a:#1eaaf1;--b:#e03545;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:#222;background:#fff} .tps *,.tps *::before,.tps *::after{box-sizing:border-box} .tps a{text-decoration:none;box-shadow:none} .tps-pg{position:fixed;top:0;left:0;right:0;height:3px;z-index:9999;background:var(--a);transform:scaleX(0);transform-origin:0 50%} .tps-wrap{max-width:1200px;margin:0 auto;padding:28px 24px 48px;display:grid;grid-template-columns:minmax(0,1fr);gap:40px} .tps-wrap.has-side{grid-template-columns:minmax(0,1fr) 300px} .tps-crumb{font-size:13px;color:#777;margin:0 0 14px} .tps-crumb a{color:#777}.tps-crumb a:hover{color:var(--a)} .tps-badge{display:inline-block;padding:4px 10px;background:var(--b);color:#fff!important;font-size:12px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;border-radius:3px;margin:0 0 12px} .tps h1.tps-title{margin:0 0 14px;padding:0;font-size:36px;line-height:1.2;font-weight:800;letter-spacing:-.5px;color:#111;text-transform:none} .tps-meta{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:14px;color:#6b7280;margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid #e8ecef} .tps-meta a{color:#111;font-weight:600} .tps-hero{display:block;width:100%;height:auto;border-radius:4px;margin:0} .tps-cap{font-size:13px;color:#777;margin:8px 0 0} .tps-share{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:18px 0 24px} .tps-share span{font-size:13px;font-weight:700;color:#555;margin-right:4px;text-transform:uppercase;letter-spacing:.5px} .tps-share a{padding:9px 14px;border-radius:4px;color:#fff!important;font-size:13px;font-weight:700;line-height:1} .tps-fb{background:#1877f2}.tps-x{background:#000}.tps-wa{background:#25a244} .tps-share a:hover{opacity:.85}.tps-content{font-size:18px;line-height:1.75;color:#222;overflow-wrap:break-word} .tps-content>*:first-child{margin-top:0} .tps-content p{margin:0 0 1.25em} .tps-content h2{font-size:26px;line-height:1.3;font-weight:800;margin:1.6em 0 .6em;color:#111} .tps-content h3{font-size:21px;line-height:1.35;font-weight:700;margin:1.4em 0 .5em;color:#111} .tps-content h4{font-size:18px;font-weight:700;margin:1.2em 0 .4em} .tps-content a{color:var(--a);text-decoration:underline;text-underline-offset:2px} .tps-content img,.tps-content video,.tps-content iframe{max-width:100%;height:auto;border-radius:3px} .tps-content figure{margin:1.5em 0} .tps-content figcaption{font-size:13px;color:#777;margin-top:6px} .tps-content ul,.tps-content ol{margin:0 0 1.25em;padding-left:1.4em} .tps-content li{margin:0 0 .4em} .tps-content blockquote{margin:1.5em 0;padding:14px 20px;border-left:4px solid var(--a);background:#f4f9fd;color:#333;font-style:italic} .tps-content blockquote p:last-child{margin:0} .tps-content table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1.25em;font-size:16px} .tps-content th,.tps-content td{padding:8px 12px;border:1px solid #dfe5ea;text-align:left} .tps-content th{background:#f4f6f8} .tps-content pre{overflow-x:auto;padding:14px;background:#111;color:#eee;border-radius:4px;font-size:14px}.tps-tags{display:flex;flex-wrap:wrap;gap:8px;margin:28px 0 0} .tps-tags a{padding:6px 12px;background:#eef2f5;color:#333!important;font-size:13px;border-radius:3px} .tps-tags a:hover{background:var(--a);color:#fff!important}.tps-author{display:flex;gap:16px;align-items:flex-start;margin:32px 0 0;padding:20px;background:#f6f8fa;border-radius:4px} .tps-author img{width:64px;height:64px;border-radius:50%;flex:0 0 64px} .tps-author b{display:block;font-size:16px;color:#111;margin:0 0 4px} .tps-author p{margin:0;font-size:14px;line-height:1.6;color:#555}.tps-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:32px 0 0} .tps-nav a{display:block;padding:14px 16px;border:1px solid #e3e8ec;border-radius:4px;color:#111!important} .tps-nav a:hover{border-color:var(--a)} .tps-nav small{display:block;font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--a);margin:0 0 4px} .tps-nav span{font-size:14px;font-weight:700;line-height:1.35} .tps-nav .nx{text-align:right;grid-column:2}.tps-h{margin:0 0 16px;padding:0 0 0 12px;border-left:4px solid var(--a);font-size:17px;line-height:22px;font-weight:800;text-transform:uppercase;letter-spacing:-.2px;color:#111} .tps-rel{margin:40px 0 0} .tps-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px} .tps-card{display:block;color:#111!important} .tps-cimg{display:block;aspect-ratio:16/10;background:#e6eaee;border-radius:3px;overflow:hidden} .tps-cimg img{display:block;width:100%;height:100%;object-fit:cover} .tps-card h4{margin:10px 0 0;font-size:15px;line-height:1.35;font-weight:700} .tps-card:hover h4{color:var(--a)}.tps-side>section{margin:0 0 32px} .tps-li{display:flex;gap:12px;align-items:center;padding:0 0 12px;margin:0 0 12px;border-bottom:1px solid #edf0f2;color:#111!important} .tps-li:last-child{border:0;margin:0;padding:0} .tps-li .tps-cimg{flex:0 0 84px;width:84px;aspect-ratio:4/3} .tps-li h4{margin:0;font-size:14px;line-height:1.35;font-weight:700} .tps-li:hover h4{color:var(--a)} .tps-cats a{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #edf0f2;font-size:15px;color:#222!important} .tps-cats a:hover{color:var(--a)!important} .tps-cats em{font-style:normal;color:#888;font-size:13px}@media(max-width:900px){ .tps-wrap.has-side{grid-template-columns:minmax(0,1fr)} .tps h1.tps-title{font-size:30px} } @media(max-width:560px){ .tps-wrap{padding:20px 16px 36px} .tps h1.tps-title{font-size:25px} .tps-content{font-size:17px} .tps-content h2{font-size:22px} .tps-grid{grid-template-columns:1fr 1fr} .tps-nav{grid-template-columns:1fr} .tps-nav .nx{grid-column:1} .tps-author{flex-direction:column} }'; }add_action( 'wp_head', function () { if ( tps_is_target() ) { echo ''; // phpcs:ignore WordPress.Security.EscapeOutput } }, 99 );/* ---------- Reading progress bar (tiny JS) ---------- */ add_action( 'wp_footer', function () { if ( ! tps_is_target() ) { return; } ?> 'lazy', 'decoding' => 'async', 'alt' => '' ) ) : ''; return '' . $img . '

' . esc_html( get_the_title( $pid ) ) . '

'; }function tps_related_ids( $id, $n ) { $key = 'tps_rel_' . $id; $ids = get_transient( $key ); if ( false === $ids ) { $q = new WP_Query( array( 'category__in' => wp_get_post_categories( $id ), 'post__not_in' => array( $id ), 'posts_per_page' => $n, 'ignore_sticky_posts' => true, 'no_found_rows' => true, 'fields' => 'ids', 'update_post_term_cache' => false, ) ); $ids = $q->posts; set_transient( $key, $ids, 6 * HOUR_IN_SECONDS ); } return $ids; }function tps_latest_ids( $exclude ) { $ids = get_transient( 'tps_latest' ); if ( false === $ids ) { $q = new WP_Query( array( 'posts_per_page' => 7, 'ignore_sticky_posts' => true, 'no_found_rows' => true, 'fields' => 'ids', 'update_post_term_cache' => false, ) ); $ids = $q->posts; set_transient( 'tps_latest', $ids, 10 * MINUTE_IN_SECONDS ); } $ids = array_values( array_diff( $ids, array( $exclude ) ) ); return array_slice( $ids, 0, 5 ); }function tps_cat_list() { $list = get_transient( 'tps_cats' ); if ( false === $list ) { $list = array(); $cats = get_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 9, 'hide_empty' => true ) ); foreach ( $cats as $c ) { if ( 'uncategorized' === $c->slug ) { continue; } $list[] = array( 'n' => $c->name, 'l' => get_category_link( $c->term_id ), 'c' => $c->count ); } set_transient( 'tps_cats', $list, 12 * HOUR_IN_SECONDS ); } return $list; }/* ---------- Main renderer ---------- */ function tps_render() { global $post; $post = is_singular() ? get_queried_object() : get_post(); if ( ! $post instanceof WP_Post ) { return ''; } setup_postdata( $post );$cfg = tps_cfg(); $id = $post->ID; $cats = get_the_category( $id ); $cat = $cats ? $cats[0] : null; $text = trim( wp_strip_all_tags( strip_shortcodes( $post->post_content ) ) ); $words = $text ? count( preg_split( '/\s+/u', $text, -1, PREG_SPLIT_NO_EMPTY ) ) : 0; $mins = max( 1, (int) ceil( $words / 200 ) ); $link = get_permalink( $id ); $title = get_the_title( $id ); $aid = (int) $post->post_author; $bio = get_the_author_meta( 'description', $aid ); $prev = get_previous_post(); $next = get_next_post(); $rel = $cfg['related'] > 0 ? tps_related_ids( $id, (int) $cfg['related'] ) : array(); $side = ! empty( $cfg['sidebar'] );ob_start(); ?>
name ); ?>

By min read
'tps-hero', 'loading' => 'eager', 'fetchpriority' => 'high', 'decoding' => 'async' ) ); // phpcs:ignore $cap = get_the_post_thumbnail_caption( $id ); if ( $cap ) { echo '

' . esc_html( $cap ) . '

'; } ?>
', '', '
', $id ); if ( $tags ) { echo $tags; } // phpcs:ignore ?>

Previous Next

Related Posts

Pakistani Prime Minister meets with tech companies’ delegations

imran khan meeting

World’s largest digital and technology companies on the sideline of the World Economic Forum’s annual meeting, Met with top executives of Facebook and YouTube.

imran khan meeting

Imran Khan met with Facebook’s chief operating officer Sheryl Sandberg and YouTube’s chief executive officer Susan Wojcicki. At the meeting on the sideline of the World Economic Forum, the Prime Minister invited technology companies to invest in Pakistan.

According to a statement issued by the Prime Minister, Imran Khan said, “social media platforms are the most growing journalism platform in the world”. Meanwhile, Sheryl Sandberg invited Prime Minister Imran Khan to visit Facebook headquarters.

imran khan wef

The meeting was also attended by Special Assistant to the Prime Minister Zulfi Bukhari, Ambassador Ali Jahangir Siddiqui, State Bank Governor Reza Baqir and Head of Digital Pakistan Tania Aidrus.

In addition, Imran Khan also met YouTube CEO Susan Wojcicki, discussing the use of digital platforms to better reflect Pakistan’s image. The Pakistani delegation discussed the possibility of attracting tourism, education, and investment through digital platforms.


The meeting discussed opportunities, challenges, and solutions for young people in the digital media sector.

Read Previous

Government of Pakistan sets up to replace CNG stations with Electric Vehicle Charging Terminals

Read Next

The world’s cheapest 5G smartphone costs less than $300

Leave a Reply

Your email address will not be published. Required fields are marked *