Skip to:
Content
Pages
Categories
Search
Top
Bottom

Layout for Categories

Viewing 9 replies - 1 through 9 (of 9 total)
  • @robin-w

    Moderator

    ok, you just posted links to stuff that is not a forum and goes to the below

    https://zw660-f1e068.pages.infusionsoft.net/

    @pixelzen

    Participant

    It shoudl work now had the maintainace mode on

    @robin-w

    Moderator

    seems I need login as well

    @pixelzen

    Participant

    Should be working now…

    @robin-w

    Moderator

    ok, now I can see – this is well beyond free help, buy suggest you start by looking at modifying

    wp-content/plugins/bbpress/templates/default/bbpress/content-archive-forum.php

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-archive-forum.php

    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-archive-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

    @pixelzen

    Participant

    Yes I got that far, not sure how to use modify the following code just for that sepecific category/forum This is the code for the discussion page

    <?php
    /**
    * [g1_bbp_forums] shortcode callback function.
    *
    * @param array $atts
    * @param string $content
    * @return string
    */
    function g1_bbp_forums_shortcode( $atts, $content ) {
    /* We need a static counter to trace a shortcode without the id attribute */
    static $counter = 0;
    $counter++;
    extract( shortcode_atts( array(
    ‘id’ => ”,
    ‘class’ => ”
    ), $atts, ‘g1_bbp_forums’ ) );
    // Compose final HTML id attribute
    $final_id = strlen( $id ) ? $id : ‘g1-bbp-forums-‘ . $counter;
    // Compose final HTML class attribute
    $final_class = array(
    ‘g1-bbp-forums’,
    );
    $final_class = array_merge( $final_class, explode( ‘ ‘, $class ) );
    // Note: private and hidden forums will be excluded via the
    // bbp_pre_get_posts_normalize_forum_visibility action and function.
    $query = new WP_Query( array(
    ‘post_type’ => bbp_get_forum_post_type(),
    ‘post_parent’ => $settings[‘parent_forum’],
    ‘post_status’ => bbp_get_public_status_id(),
    ‘posts_per_page’ => get_option( ‘_bbp_forums_per_page’, 50 ),
    ‘ignore_sticky_posts’ => true,
    ‘no_found_rows’ => true,
    ‘orderby’ => ‘menu_order title’,
    ‘order’ => ‘ASC’
    ) );
    if ( ! $query->have_posts() ) {
    return ”;
    }
    // Start output buffer
    ob_start();
    ?>
    <div class=”<?php echo implode( ‘ ‘, array_map( ‘sanitize_html_class’, $final_class ) ); ?>”>
    <div class=”g1-collection g1-collection–grid g1-collection–one-third g1-collection–simple”>

      <?php while ( $query->have_posts() ) : $query->the_post(); ?>
      <li class=”g1-collection__item”>
      <article>
      <?php if ( has_post_thumbnail() ): ?>
      <figure class=”entry-featured-media”>

      post->ID ); ?>”>
      <?php the_post_thumbnail( ‘g1_one_third’ ); ?>

      </figure>
      <?php else: ?>
      <?php echo do_shortcode( ‘[placeholder icon=”camera” size=”g1_one_third”]’ ); ?>
      <?php endif; ?>
      <div class=”g1-nonmedia”>
      <div class=”g1-inner”>
      <header class=”entry-header”>
      <h3 class=”entry-title”>
      post->ID ); ?>”><?php bbp_forum_title( $query->post->ID ); ?>
      </h3>
      <p class=”entry-meta g1-meta”>
      <span><?php _e( ‘Topics’, ‘bbpress’ ); ?>: <?php bbp_forum_topic_count( $query->post->ID ); ?></span>
      <span><?php bbp_show_lead_topic() ? _e( ‘Replies’, ‘bbpress’ ) : _e( ‘Posts’, ‘bbpress’ ); ?>: <?php bbp_show_lead_topic() ? bbp_forum_reply_count( $query->post->ID ) : bbp_forum_post_count( $query->post->ID ); ?></span>
      </p>
      </header>
      <div class=”entry-summary”>
      <?php the_excerpt(); ?>
      </div>
      </div>
      </div>
      </article>

      <?php endwhile; ?>

    </div>
    </div>
    <?php
    // Reset the $post global
    wp_reset_postdata();
    // Return and flush the output buffer
    return ob_get_clean();
    }
    add_shortcode( ‘g1_bbp_forums’, ‘g1_bbp_forums_shortcode’ );

    @robin-w

    Moderator

    ok, no idea what your question is, you say you want them to look like what you have already solved.

    Have another go at phrasing the question

    @pixelzen

    Participant

    This code came with the theme, I dont know how to modify it so that works with specfic categories and/or forums . It Currently shows all categories and forms and sub forums.

    @robin-w

    Moderator

    that would be bespoke (paid) work

    if interested contact me via

    Contact me

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar