/** * Digital Newspaper functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Digital Newspaper Pro */ use Digital_Newspaper\CustomizerDefault as DN; if ( !defined( 'DIGITAL_NEWSPAPER_VERSION' ) ) { // Replace the version number of the theme on each release. $theme_info = wp_get_theme(); define( 'DIGITAL_NEWSPAPER_VERSION', $theme_info->get( 'Version' ) ); } if ( !defined( 'DIGITAL_NEWSPAPER_PREFIX' ) ) { // Replace the prefix of theme if changed. define( 'DIGITAL_NEWSPAPER_PREFIX', 'digital_newspaper_' ); } /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function digital_newspaper_setup() { $nprefix = 'digital-newspaper-'; /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Digital Newspaper, use a find and replace * to change 'digital-newspaper-pro' to the name of your theme in all the template files. */ load_theme_textdomain( 'digital-newspaper-pro', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // add_image_size( 'digital-newspaper-large', 1400, 800, true ); add_image_size( $nprefix . 'featured', 1020, 700, true ); add_image_size( $nprefix . 'list', 600, 400, true ); add_image_size( $nprefix . 'thumb', 300, 200, true ); add_image_size( $nprefix . 'small', 150, 95, true ); add_image_size( $nprefix . 'grid', 400, 250, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Top Header', 'digital-newspaper-pro' ), 'menu-2' => esc_html__( 'Main Header', 'digital-newspaper-pro' ), 'menu-3' => esc_html__( 'Bottom Footer', 'digital-newspaper-pro' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script' ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( DIGITAL_NEWSPAPER_VERSION . 'custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 100, 'width' => 100, 'flex-width' => true, 'flex-height' => true, ) ); } add_action( 'after_setup_theme', 'digital_newspaper_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function digital_newspaper_content_width() { $GLOBALS['content_width'] = apply_filters( 'digital_newspaper_content_width', 640 ); } add_action( 'after_setup_theme', 'digital_newspaper_content_width', 0 ); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; require get_template_directory() . '/inc/admin/class-theme-info.php'; add_filter( 'get_the_archive_title_prefix', 'digital_newspaper_prefix_string' ); function digital_newspaper_prefix_string( $prefix ) { $archive_page_title_prefix = DN\digital_newspaper_get_customizer_option( 'archive_page_title_prefix' ); if ( $archive_page_title_prefix ) { return apply_filters( 'digital_newspaper_archive_page_title_prefix', $prefix ); } return apply_filters( 'digital_newspaper_archive_page_title_prefix', false ); } add_action( 'pre_get_posts', 'digital_newspaper_custom_get_posts' ); function digital_newspaper_custom_get_posts( $query ) { if ( !digital_newspaper_is_paged_filtered() ) { return; } if ( isset( $_GET['posts'] ) ) { switch ( $_GET['posts'] ) { case 'random': $query->set( 'orderby', 'rand' ); break; case 'today': $todayDate = getdate(); $query->set( 'date_query', array( 'year' => $todayDate['year'], 'month' => $todayDate['mon'], 'day' => $todayDate['mday'], ) ); break; case 'this-week': $query->set( 'date_query', array( 'year' => date( 'Y' ), 'week' => date( 'W' ), ) ); break; case 'last-seven-days': $query->set( 'date_query', array( 'after' => '1 week ago', ) ); break; case 'this-month': $todayDate = getdate(); $query->set( 'date_query', array( 'month' => $todayDate['mon'], ) ); break; case 'last-month': $thisdate = getdate(); if ( $thisdate['mon'] != 1 ) { $lastmonth = $thisdate['mon'] - 1; } else { $lastmonth = 12; } $thisyear = date( 'Y' ); if ( $lastmonth != 12 ) { $thisyear = date( 'Y' ); } else { $thisyear = date( 'Y' ) - 1; } $query->set( 'date_query', array( 'year' => $thisyear, 'month' => $lastmonth, ) ); break; case 'last-week': $thisweek = date( 'W' ); if ( $thisweek != 1 ) { $lastweek = $thisweek - 1; } else { $lastweek = 52; } $thisyear = date( 'Y' ); if ( $lastweek != 52 ) { $thisyear = date( 'Y' ); } else { $thisyear = date( 'Y' ) - 1; } $query->set( 'date_query', array( 'year' => $thisyear, 'week' => $lastweek, ) ); break; case 'this-year': $thisweek = date( 'W' ); if ( $thisweek != 1 ) { $lastweek = $thisweek - 1; } else { $lastweek = 52; } $thisyear = date( 'Y' ); if ( $lastweek != 52 ) { $thisyear = date( 'Y' ); } else { $thisyear = date( 'Y' ) - 1; } $query->set( 'date_query', array( 'year' => $thisyear, ) ); break; default: return; } } } if ( !function_exists( 'dn_fs' ) ) { // Create a helper function for easy SDK access. function dn_fs() { global $dn_fs; if ( !isset( $dn_fs ) ) { // Include Freemius SDK. require_once dirname( __FILE__ ) . '/freemius/start.php'; $dn_fs = fs_dynamic_init( array( 'id' => '11975', 'slug' => 'digital-newspaper-pro', 'premium_slug' => 'digital-newspaper-pro', 'type' => 'theme', 'public_key' => 'pk_e0ee851aad35f391a6320a77c9b2c', 'is_premium' => true, 'is_premium_only' => true, 'has_addons' => false, 'has_paid_plans' => true, 'is_org_compliant' => false, 'trial' => array( 'days' => 7, 'is_require_payment' => true, ), 'menu' => array( 'slug' => 'digital-newspaper-info', 'support' => false, 'parent' => array( 'slug' => 'themes.php', ), ), 'is_live' => true, ) ); } return $dn_fs; } // Init Freemius. dn_fs(); // Signal that SDK was initiated. do_action( 'dn_fs_loaded' ); } add_filter( 'get_header_image_tag', function ( $html, $header, $attr ) { $attachment_custom_url = get_post_meta( $header->attachment_id, 'attachment_custom_url', true ); if ( $attachment_custom_url ) { $html = '<a href="' . esc_url( $attachment_custom_url ) . '" target="_blank">' . $html; } if ( $attachment_custom_url ) { $html .= '</a>'; } return $html; }, 10, 3 );<!doctype html> <html lang="en-US" prefix="og: https://ogp.me/ns#"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="profile" href="https://gmpg.org/xfn/11"> <!-- Search Engine Optimization by Rank Math - https://rankmath.com/ --> <meta name="description" content="Latest Business News, Sports News, Environment & SMEs"/> <meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large"/> <link rel="canonical" href="https://glokafui.com/" /> <link rel="next" href="https://glokafui.com/page/2/" /> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" /> <meta property="og:title" content="Glokafui Media | Latest Business News, Sports News, Environment & SMEs" /> <meta property="og:description" content="Glokafui Media is an independent online news platform founded by Gloria Kafui Kudzo, a Ghanaian journalist and activist committed to responsible storytelling, public accountability, and inclusive media representation." /> <meta property="og:url" content="https://glokafui.com/" /> <meta property="og:site_name" content="Glokafui Media" /> <meta property="og:image" content="https://glokafui.com/wp-content/uploads/2026/01/m-1024x1024.jpg" /> <meta property="og:image:secure_url" content="https://glokafui.com/wp-content/uploads/2026/01/m-1024x1024.jpg" /> <meta property="og:image:width" content="1024" /> <meta property="og:image:height" content="1024" /> <meta property="og:image:alt" content="Glokafui Media Logo Privacy Policy & Editorial Policy" /> <meta property="og:image:type" content="image/jpeg" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:title" content="Glokafui Media | Latest Business News, Sports News, Environment & SMEs" /> <meta name="twitter:description" content="Glokafui Media is an independent online news platform founded by Gloria Kafui Kudzo, a Ghanaian journalist and activist committed to responsible storytelling, public accountability, and inclusive media representation." /> <meta name="twitter:image" content="https://glokafui.com/wp-content/uploads/2026/01/m-1024x1024.jpg" /> <script type="application/ld+json" class="rank-math-schema">{"@context":"https://schema.org","@graph":[{"@type":"Place","@id":"https://glokafui.com/#place","address":{"@type":"PostalAddress","streetAddress":"Glokafui Media","addressLocality":"Accra","addressRegion":"Greater Accra","postalCode":"0023321","addressCountry":"GH0023321"}},{"@type":"Organization","@id":"https://glokafui.com/#organization","name":"Glokafui Media","url":"https://glokafui.com","email":"info.glokafui@gmail.com","address":{"@type":"PostalAddress","streetAddress":"Glokafui Media","addressLocality":"Accra","addressRegion":"Greater Accra","postalCode":"0023321","addressCountry":"GH0023321"},"logo":{"@type":"ImageObject","@id":"https://glokafui.com/#logo","url":"https://glokafui.com/wp-content/uploads/2026/01/m-1.png","contentUrl":"https://glokafui.com/wp-content/uploads/2026/01/m-1.png","caption":"Glokafui Media","inLanguage":"en-US","width":"15360","height":"15360"},"description":"Glokafui Media is an independent online news platform founded by Gloria Kafui Kudzo, a Ghanaian journalist and activist committed to responsible storytelling, public accountability, and inclusive media representation.","legalName":"Glokafui Media","location":{"@id":"https://glokafui.com/#place"}},{"@type":"WebSite","@id":"https://glokafui.com/#website","url":"https://glokafui.com","name":"Glokafui Media","alternateName":"Glokafui Media","publisher":{"@id":"https://glokafui.com/#organization"},"inLanguage":"en-US","potentialAction":{"@type":"SearchAction","target":"https://glokafui.com/?s={search_term_string}","query-input":"required name=search_term_string"}},{"@type":"CollectionPage","@id":"https://glokafui.com/#webpage","url":"https://glokafui.com/","name":"Glokafui Media | Latest Business News, Sports News, Environment & SMEs","about":{"@id":"https://glokafui.com/#organization"},"isPartOf":{"@id":"https://glokafui.com/#website"},"inLanguage":"en-US"}]}</script> <!-- /Rank Math WordPress SEO plugin --> <style id='wp-img-auto-sizes-contain-inline-css' type='text/css'> img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px} /*# sourceURL=wp-img-auto-sizes-contain-inline-css */ </style> <link rel='stylesheet' id='dashicons-css' href='https://glokafui.com/wp-includes/css/dashicons.min.css?ver=6.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='post-views-counter-frontend-css' href='https://glokafui.com/wp-content/plugins/post-views-counter/css/frontend.css?ver=1.7.3' type='text/css' media='all' /> <style id='wp-emoji-styles-inline-css' type='text/css'> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } /*# sourceURL=wp-emoji-styles-inline-css */ </style> <style id='wp-block-library-inline-css' type='text/css'> :root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}} /*# sourceURL=wp-block-library-inline-css */ </style> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} /*# sourceURL=/wp-includes/css/classic-themes.min.css */ </style> <link rel="https://api.w.org/" href="https://glokafui.com/wp-json/" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://glokafui.com/xmlrpc.php?rsd" /> <meta name="generator" content="WordPress 6.9.4" /> <meta name="google-site-verification" content="XnSTfHzwu507BmiRNCv2NXQVmY4ydlVefSLl0oxkIwE" /> <script type="text/javascript" id="google_gtagjs" src="https://www.googletagmanager.com/gtag/js?id=G-LFHL8V572W" async="async"></script> <script type="text/javascript" id="google_gtagjs-inline"> /* <![CDATA[ */ window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-LFHL8V572W', {} ); /* ]]> */ </script> <link rel="icon" href="https://glokafui.com/wp-content/uploads/2026/01/Kafui-spot-logo-150x150.png" sizes="32x32" /> <link rel="icon" href="https://glokafui.com/wp-content/uploads/2026/01/Kafui-spot-logo.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://glokafui.com/wp-content/uploads/2026/01/Kafui-spot-logo.png" /> <meta name="msapplication-TileImage" content="https://glokafui.com/wp-content/uploads/2026/01/Kafui-spot-logo.png" /> </head> <body class="home blog wp-custom-logo wp-theme-digital-newspaper-pro"