Skip to:
Content
Pages
Categories
Search
Top
Bottom

Subforum or topic not showing


  • gamersk
    Participant

    @gamersk

    Hello,

    I have problem. I have on website bbPress with demo data but when i chose some forum or some subpage it’s blank. https://gamenice.sk/forum/

    functions.php

    <?php
    show_admin_bar(false);
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);
    function theme_enqueue_scripts() {
    
        $template_directory_uri = get_template_directory_uri();
    
        wp_enqueue_style( 'reset', $template_directory_uri . '/assets/css/reset.min.css', false, '1.0' );
        wp_enqueue_style( 'app', $template_directory_uri . '/assets/css/app.min.css?v=' . time(), array( 'reset' ), '1.0' );
        wp_enqueue_style( 'forum', $template_directory_uri . '/assets/css/forum.min.css?v=' . time(), array( 'app' ), '1.0' );
    
        wp_enqueue_script( 'html5shiv', $template_directory_uri . '/assets/js/html5shiv.min.js' );
        wp_script_add_data( 'html5shiv', 'conditional', 'lt IE 9' );
        wp_enqueue_script( 'selectivizr', $template_directory_uri . '/assets/js/selectivizr.min.js' );
        wp_script_add_data( 'selectivizr', 'conditional', 'lt IE 9' );
    
        wp_enqueue_script( 'jquery', $template_directory_uri . '/assets/js/jquery.min.js', false, '3.3.1' );
        wp_enqueue_script( 'app', $template_directory_uri . '/assets/js/app.js', array( 'jquery' ), '1.0' );
    
        wp_localize_script( 'app', 'carouselSettings', array( 'timeout' => get_option('carousel_timeout').'000' ) );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_scripts' );
    
    function get_excerpt($where = ''){
        $excerpt = get_the_content();
        $excerpt = strip_shortcodes($excerpt);
        $excerpt = strip_tags($excerpt);
        switch ($where) {
            case 'carousel':
                if ( wp_is_mobile() )
                    $excerpt = substr($excerpt, 0, 120);
                else $excerpt = substr($excerpt, 0, 250);
                break;
            case 'head':
                $excerpt = substr($excerpt, 0, 200);
                break;
            default:
                if ( wp_is_mobile() )
                    $excerpt = substr($excerpt, 0, 300);
                else $excerpt = substr($excerpt, 0, 725);
                break;
        }
        $excerpt = substr($excerpt, 0, strripos($excerpt, " "));
        $excerpt = $excerpt.'...';
        return $excerpt;
    }
    
    function get_thumbnail_url() {
        $thumbnail = get_the_post_thumbnail_url() != '' ? get_the_post_thumbnail_url() : get_template_directory_uri() . '/assets/img/og-image.png';
        return $thumbnail;
    }
    
    function themename_custom_logo_setup() {
        $defaults = array(
            'height'      => 111,
            'width'       => 220,
            'flex-height' => true,
            'flex-width'  => true,
        );
        add_theme_support( 'custom-logo', $defaults );
    }
    add_action( 'after_setup_theme', 'themename_custom_logo_setup' );
    add_theme_support( 'post-thumbnails' );
    function register_my_menus() {
      register_nav_menus(
        array(
          'header-menu' => __( 'Header Menu' ),
          'footer-menu' => __( 'Footer Menu' )
        )
      );
    }
    add_action( 'init', 'register_my_menus' );
    function show_menu($menu_name) {
        $defaults = array(
            'theme_location'  => '',
            'menu'            => $menu_name,
            'container'       => '',
            'container_class' => '',
            'container_id'    => '',
            'menu_class'      => $menu_name,
            'menu_id'         => '',
            'echo'            => true,
            'fallback_cb'     => 'wp_page_menu',
            'before'          => '',
            'after'           => '',
            'link_before'     => '',
            'link_after'      => '',
            'items_wrap'      => '<ul class="inline-list %2$s">%3$s</ul>',
            'depth'           => 0,
            'walker'          => ''
        );
        wp_nav_menu($defaults);
    }
    
    include 'inc/theme-settings.php';

    forum.php

    <?php include 'header.php'; ?>
    
    <section class="forum-wrapper">
        <div class="container">
            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
                <?php the_content(); ?>
    
            <?php endwhile; endif; ?>
        </div>
    </section>
    
    <?php include 'footer.php'; ?>
    
  • You must be logged in to reply to this topic.
Skip to toolbar