• I am having problems getting categories to load into a dynamic page. I have created a custom menu as my primary header menu that has “News” and a sub-menu of several post Categories. Those Category archive pages are not loading. Since the site is live, while I try to diagnose, I have removed the sub menu but you can still see the problem by going to a page with one of the posts and see the Category list in the sidebar. These links, and the links under the title, next to date and author, that point to the Categories aren’t working. Neither is the Author link. Essentially any link pointing to a dynamic listing is not working.

    Thanks so much for any help!
    Jen

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • what does your archive.php look like? is your theme using category.php if so, what does that look like?

    Thread Starter jenstrawbrax

    (@jenstrawbrax)

    Thanks for the reply. How do I find my archive.php and category.php? I’m sorry I’m not a developer but am willing and able to learn with a little extra help.

    Thread Starter jenstrawbrax

    (@jenstrawbrax)

    Here’s my index.php (I couldn’t find archive.php or category.php

    <?php
    get_header();
    borntogive_sidebar_position_module();
    $borntogive_options = get_option(‘borntogive_options’);
    $id = get_option(‘page_for_posts’);
    if ($id == 0 || $id == ”) {
    $id = get_the_ID();
    }
    $page_sidebarget = get_post_meta($id, ‘borntogive_select_sidebar_from_list’, true);
    $pageSidebarStrictNo = get_post_meta($id, ‘borntogive_strict_no_sidebar’, true);
    $pageSidebarOpt = (isset($borntogive_options[‘blog_archive_sidebar’])) ? $borntogive_options[‘blog_archive_sidebar’] : ”;
    $blog_content_type = (isset($borntogive_options[‘blog_content_type’])) ? $borntogive_options[‘blog_content_type’] : ”;
    if ($page_sidebarget != ”) {
    $pageSidebar = $page_sidebarget;
    } elseif ($pageSidebarOpt != ”) {
    $pageSidebar = $pageSidebarOpt;
    } else {
    $pageSidebar = ‘blog-sidebar’;
    }
    if ($pageSidebarStrictNo == 1) {
    $pageSidebar = ”;
    }
    $sidebar_column = get_post_meta($id, ‘borntogive_sidebar_columns_layout’, true);
    $sidebar_column = ($sidebar_column == ”) ? 4 : $sidebar_column;
    if (!empty($pageSidebar) && is_active_sidebar($pageSidebar)) {
    $left_col = 12 – intval($sidebar_column);
    $class = $left_col;
    } else {
    $class = 12;
    }
    if(is_archive()){ ?>
    <div class=”hero-area”>
    <?php
    $tax = $wp_query->get_queried_object();
    $image = get_option(‘category’ . $tax->term_id . ‘_term_banner’);
    $height = ”;
    echo ‘<div class=”page-banner parallax” style=”background-image:url(‘ . esc_url($image) . ‘); height:’ . esc_attr($height) . ‘px’ . ‘;”>’;
    ?>
    <div class=”container”>
    <div class=”page-banner-text”>
    <h1 class=”block-title”><?php echo esc_attr(single_term_title()); ?></h1>
    </div>
    </div>
    </div>
    <?php } else {
    $page_header = get_post_meta($id, ‘borntogive_pages_Choose_slider_display’, true);
    if ($page_header == 3 || $page_header == 4) {
    get_template_part(‘pages’, ‘flex’);
    } elseif ($page_header == 5) {
    get_template_part(‘pages’, ‘revolution’);
    } else {
    get_template_part(‘pages’, ‘banner’);
    }
    }
    ?>
    <!– Start Body Content –>
    <div id=”main-container”>
    <div class=”content”>
    <div class=”container”>
    <div class=”row”>
    <div class=”col-md-<?php echo esc_attr($class); ?> content-block” id=”content-col”>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post();
    ?>
    <div <?php post_class(‘blog-list-item’); ?>>
    <div class=”row”>
    <?php if (has_post_thumbnail()) { ?>
    <div class=”col-md-4 col-sm-4″>

    @jenstrawbrax Took another look, you have some inline CSS of:

    
    .hero-area {
        display: none;
    }

    Your content is there on the page but hidden because of that. The CSS is inline in the page so you need to find out why it’s even there.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Category archive page not loading posts’ is closed to new replies.