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

A real-life BB-8 is on its way to the consumer market

samsung ballie

Today at CES press Conference, Samsung introduced a Ball-Shaped mini robot called ballie. The company says that the robot uses the latest AI features to provide complete security, and will operate all the smart devices on your house.

The advance AI design allows it to do many things like a fitness trainer, control things and even become friends with your children.

In the onstage demo, Ballie followed the CEO of Samsung consumer electronics, and when he moves backward, keeps his space. The device uses advanced AI-based cameras to track the movement of its user and provide a complete response when needed. H.S Kim called the robot on stage, and it effectively showcased it.

Read More: Up to five days of battery life on a single charge

In the demo video, you can see that it can do a lot of things. It wakes it, user, on time, set music for mood, take care of the blinds, clean the house, and control every smart application on your house.

Samsung isn’t the one to make remarkable AI-based robots. Sony, last year released a home-based AI robot dog named Aibo. Furthermore, the company didn’t share the actual news on when this product will be available for the general public, nor shown us the cost. But for now, it’s a cute little robot that looks like BB-8.

 

Read Previous

Sony surprises its customer with an electric car called Vision-S

Read Next

Samsung new technology – AI humans

Leave a Reply

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