</div> <div class="main-section gray bottom"> <div class="w-container"> <div data-ix="newsletter-appear" class="section-heading"> <div class="med-divider divide-test"></div> <h2 class="section-title">UP NEXT</h2> <div class="med-divider"></div> </div> <div class="w-dyn-list"_id="DYN_CONTEXT"_CONTEXT.category"_random"> <div class="w-dyn-items w-row w-clearfix"> <?php $args = array('cat' => $cat_meta['cat_id'], 'posts_per_page' => 8); $query = new WP_Query($args); while ($query->have_posts()) { $query->the_post(); $cat_meta = get_category_meta($post->ID); $full_name = get_author_fullname($post->post_author); ?> <div class="w-dyn-item w-col w-col-3 blog-thumbnail"> <a data-ix="blog-thumbnail" class="w-inline-block thumbnail-wrapper"> <div class="image-wrapper"> <div class="thumbnail-image" style="background-image: url(<?php echo wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?> );"></div> <?php if (is_array($cat_meta)) { ?> <div class="tag-name" style="background-color:<?php echo $cat_meta['cat_color']; ?>
include "class/manager-functions.php"; $newcat = strtolower(trim($_POST['newcat'])); if ($newcat == '') { echo 'category is empty !'; exit; } //replace blank space with '-' $newcat = str_replace(' ', '-', $newcat); //check duplicate $duplicate = check_duplicate_category($newcat); if ($duplicate) { echo 'category exists already'; exit; } //everything is ok proceed to write DB $datetime = date('Y-m-d H:i:s'); $query_string = "/category/{$newcat}/"; $path = $tld2 . $query_string; //create meta_id $sql = "insert into `{$tprefix}" . "_meta` (`query_string`,`path`,`meta_canonical`,`type`) values ('{$query_string}','{$path}','checked','category')"; echo $sql . '<br>'; $db->query($sql); //get_meta_id $meta_id = get_category_meta($query_string); // $sql = "insert into `{$tprefix}" . "_category` (`cat_label`,`parent_id`,`meta_id`,`datetime`) values ('{$newcat}','1','{$meta_id}','{$datetime}')"; echo $sql . '<br>'; $db->query($sql); $redirect = $tld . "manage/settings/index.php"; echo "Redirecting to : " . $redirect; echo "<meta http-equiv='refresh' content='0; url={$redirect}'>";
</div> </div> </div> <div class="w-container"> <div class="w-clearfix section-heading"> <div class="med-divider divide-test"></div> <h2 class="section-title">ALL TAGS</h2> <div class="med-divider"></div> </div> <div class="w-dyn-list"> <div class="w-dyn-items w-row"> <?php foreach (get_categories() as $cat) { ?> <?php $cat_meta = get_category_meta(NULL, $cat->term_id); ?> <div class="w-dyn-item w-col w-col-3"> <a href="/category/<?php echo $cat->slug; ?> " class="w-inline-block tag-block"> <div data-ix="category-thumbnail" class="thumbnail" <?php if (isset($cat_meta['cat_bg_image']) && !is_null($cat_meta['cat_bg_image'])) { ?> style="background-image:url(<?php echo $cat_meta['cat_bg_image']; ?> );" <?php } ?>
<!DOCTYPE html> <html> <body class="full-body-tan"> <?php get_header(); ?> <?php $cat_id = get_query_var('cat'); $cat_meta = get_category_meta(NULL, $cat_id); //pd($cat_meta); ?> <div class="inner-hero" <?php if (isset($cat_meta['cat_bg_image']) && !is_null($cat_meta['cat_bg_image'])) { ?> style="background-image:url(<?php echo $cat_meta['cat_bg_image']; ?> );" <?php } ?> > <div class="w-container hero-wrapper"> <h1 class="hero-header tags"><?php echo get_cat_name($cat_meta['cat_id']); ?> </h1> </div> <div class="dark-overlay"></div> </div> <div class="w-section main-section"> <div class="body">