Forum Replies Created

Viewing 15 replies - 436 through 450 (of 639 total)
  • Theme Author acosmin

    (@acosmin)

    Hey, sorry, but this is starting to feel like custom work. I tried helping but I can only give support for bugs regarding the default functionality of the theme.

    You can leave this topic opened, maybe someone will help you.

    You can also try:
    https://wordpress.org/support/forum/themes-and-templates
    http://jobs.wordpress.net/

    Theme Author acosmin

    (@acosmin)

    <?php
    /* ------------------------------------------------------------------------- *
     *	Index template
    /* ------------------------------------------------------------------------- */
    ?>
    <?php get_header(); ?>
    
    <section class="container<?php ac_mini_disabled() ?> clearfix">
    
        <?php get_sidebar( 'browse' ); ?>
    
        <div class="wrap-template-1 clearfix">
    
        <section class="content-wrap" role="main">
    
            <?php
    			if ( of_get_option( 'ac_show_slider' ) && is_front_page() && !is_paged() && ac_featured_posts_count() > 2 ) {
    				get_template_part( 'featured-content' );
    			}
    		?>
    
        	<div class="posts-wrap clearfix">
    
            <?php
                            $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
                            $args = array( 'cat' => -2691, 'posts_per_page' => 6, 'paged' => $paged );
                            $new_query = new WP_Query( $args );
    			if ( $new_query->have_posts() ) :
    				while ( $new_query->have_posts() ) :
    					$new_query->the_post();
    					get_template_part( 'post-templates/content' );
    				endwhile;
    			else :
    				get_template_part( 'post-templates/content', 'no-articles' );
    			endif;
    		?>
    
            </div><!-- END .posts-wrap -->
    
            <?php ac_paginate(); wp_reset_postdata(); ?>
    
        </section><!-- END .content-wrap -->
    
        <?php get_sidebar(); ?>
    
        </div><!-- END .wrap-template-1 -->
    
    </section><!-- END .container -->
    
    <?php get_footer(); ?>
    Theme Author acosmin

    (@acosmin)

    Change your index contents with this:

    <?php
    /* ------------------------------------------------------------------------- *
     *	Index template
    /* ------------------------------------------------------------------------- */
    ?>
    <?php get_header(); ?>
    
    <section class="container<?php ac_mini_disabled() ?> clearfix">
    
        <?php get_sidebar( 'browse' ); ?>
    
        <div class="wrap-template-1 clearfix">
    
        <section class="content-wrap" role="main">
    
            <?php
    			if ( of_get_option( 'ac_show_slider' ) && is_front_page() && !is_paged() && ac_featured_posts_count() > 2 ) {
    				get_template_part( 'featured-content' );
    			}
    		?>
    
        	<div class="posts-wrap clearfix">
    
            <?php
                            $args = array( 'cat' => -2691, 'posts_per_page' => 6 );
                            $new_query = new WP_Query( $args );
    			if ( $new_query->have_posts() ) :
    				while ( $new_query->have_posts() ) :
    					$new_query->the_post();
    					get_template_part( 'post-templates/content' );
    				endwhile;
    			else :
    				get_template_part( 'post-templates/content', 'no-articles' );
    			endif;
    		?>
    
            </div><!-- END .posts-wrap -->
    
            <?php ac_paginate(); wp_reset_postdata(); ?>
    
        </section><!-- END .content-wrap -->
    
        <?php get_sidebar(); ?>
    
        </div><!-- END .wrap-template-1 -->
    
    </section><!-- END .container -->
    
    <?php get_footer(); ?>

    Theme Author acosmin

    (@acosmin)

    No problem.

    Theme Author acosmin

    (@acosmin)

    Replace all index.php contents with this:

    <?php
    /* ------------------------------------------------------------------------- *
     *	Index template
    /* ------------------------------------------------------------------------- */
    ?>
    <?php get_header(); ?>
    
    <section class="container<?php ac_mini_disabled() ?> clearfix">
    
        <?php get_sidebar( 'browse' ); ?>
    
        <div class="wrap-template-1 clearfix">
    
        <section class="content-wrap" role="main">
    
            <?php
    			if ( of_get_option( 'ac_show_slider' ) && is_front_page() && !is_paged() && ac_featured_posts_count() > 2 ) {
    				get_template_part( 'featured-content' );
    			}
    		?>
    
        	<div class="posts-wrap clearfix">
    
            <?php
                            $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
                            $args = array( 'cat' => -2691, 'paged' => $paged );
                            $new_query = new WP_Query( $args );
    			if ( $new_query->have_posts() ) :
    				while ( $new_query->have_posts() ) :
    					$new_query->the_post();
    					get_template_part( 'post-templates/content' );
    				endwhile;
    			else :
    				get_template_part( 'post-templates/content', 'no-articles' );
    			endif;
    		?>
    
            </div><!-- END .posts-wrap -->
    
            <?php ac_paginate(); wp_reset_postdata(); ?>
    
        </section><!-- END .content-wrap -->
    
        <?php get_sidebar(); ?>
    
        </div><!-- END .wrap-template-1 -->
    
    </section><!-- END .container -->
    
    <?php get_footer(); ?>
    Theme Author acosmin

    (@acosmin)

    It won’t, put -2691 with a – sign in front

    Theme Author acosmin

    (@acosmin)

    Try:

    <?php
                            $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
                            $args = array( 'cat' => 3, 'paged' => $paged );
                            $new_query = new WP_Query( $args );
    			if ( $new_query->have_posts() ) :
    				while ( $new_query->have_posts() ) :
    					$new_query->the_post();
    					get_template_part( 'post-templates/content' );
    				endwhile;
    			else :
    				get_template_part( 'post-templates/content', 'no-articles' );
    			endif;
    wp_reset_postdata();
    		?>
    Theme Author acosmin

    (@acosmin)

    The only way to exclude posts from the homepage is like a wrote above:

    $new_query = new WP_Query( 'cat=-2691' );
    or
    $new_query = new WP_Query( 'category__not_in' => 2691 );

    So change this in index.php:

    <?php
    			if ( have_posts() ) :
    				while ( have_posts() ) :
    					the_post();
    					get_template_part( 'post-templates/content' );
    				endwhile;
    			else :
    				get_template_part( 'post-templates/content', 'no-articles' );
    			endif;
    		?>

    to:

    <?php
                            $new_query = new WP_Query( 'cat=-2691' );
    			if ( $new_query->have_posts() ) :
    				while ( $new_query->have_posts() ) :
    					$new_query->the_post();
    					get_template_part( 'post-templates/content' );
    				endwhile;
    			else :
    				get_template_part( 'post-templates/content', 'no-articles' );
    			endif;
    wp_reset_postdata();
    		?>

    You can find more info here, under “Exclude Posts Belonging to Category”

    Theme Author acosmin

    (@acosmin)

    You want to exclude posts that are from that category or you don’t want to show that category name bellow posts?

    Can you make a printscreen and show me what you want to hide?

    Theme Author acosmin

    (@acosmin)

    Well I don’t see any posts from that category on the homepage or on the other pages. I think it’s working.

    Theme Author acosmin

    (@acosmin)

    Instead of:
    $new_query = new WP_Query( 'cat=-2691' );
    try:
    $new_query = new WP_Query( 'category__not_in' => 2691 );

    Theme Author acosmin

    (@acosmin)

    Also in index.php put this:

    <?php wp_reset_postdata(); ?>

    above:

    </div><!-- END .posts-wrap -->

    Theme Author acosmin

    (@acosmin)

    Do the posts on page 4 have more than one category?

    Theme Author acosmin

    (@acosmin)

    1. JustWrite is using the native WordPress thumbnail feature, you just need to set them up.

    http://www.acosmin.com/documentation/post-thumbnails/
    http://codex.wordpress.org/Post_Thumbnails

    2. Open index.php find:

    if ( have_posts() ) :
    				while ( have_posts() ) :
    					the_post();

    Replace it with:

    $new_query = new WP_Query( 'cat=-12' );
    if ( $new_query->have_posts() ) :
    				while ( $new_query->have_posts() ) :
    					$new_query->the_post();

    Where 12 is the category’s id you want to exclude. To find the category id read this thread.

    Theme Author acosmin

    (@acosmin)

    can you post a link to your website?

Viewing 15 replies - 436 through 450 (of 639 total)