• Resolved havingfun

    (@havingfun)


    If you can visit youandthekids.com for me, you will notice it shows two recently published articles below the slide. I would like to show maybe six rather than just two. Can I even do this? Would the theme allow me? If so, how?

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • It is difficult to say without looking at the theme in action including the admin area. Some theme have it so you can’t some are designed to be more flexible.

    Moderator keesiemeijer

    (@keesiemeijer)

    Try changing this in index.php [untested]:

    $args = array( 'meta_key' => 'feat_front', 'meta_value'=> '1', 'suppress_filters' => 0, 'post_type' => array('post', 'page'), 'post_status' => 'publish', 'numberposts' => 2, 'orderby' => $feat_sort, 'order' => $feat_order);
    
    		$myposts = get_posts( $args );
    
    		if(!$myposts) {
    
    			$args = array('suppress_filters' => 0, 'post_type' => array('post'), 'post_status' => 'publish', 'numberposts' => 2, 'orderby' => $feat_sort, 'order' => $feat_order);
    
    			$myposts = get_posts( $args );
    
    		}

    to this:

    $args = array( 'meta_key' => 'feat_front', 'meta_value'=> '1', 'suppress_filters' => 0, 'post_type' => array('post', 'page'), 'post_status' => 'publish', 'posts_per_page' => 6, 'orderby' => $feat_sort, 'order' => $feat_order);
    
    		$myposts = get_posts( $args );
    
    		if(!$myposts) {
    
    			$args = array('suppress_filters' => 0, 'post_type' => array('post'), 'post_status' => 'publish', 'posts_per_page' => 6, 'orderby' => $feat_sort, 'order' => $feat_order);
    
    			$myposts = get_posts( $args );
    
    		}

    Thread Starter havingfun

    (@havingfun)

    @keesiemeijer

    Thank you so much! That worked perfectly. There is now a large space to the right of the articles and above the list of latest articles. By chance, would you know which php I can paste an ad code to fill this spacing? Would it still be within index.php? Can I bring the “latest articles” section up to the top or will it have to stay in the bottom?

    youandthekids.com

    That is what I was afraid of would happen if you just changed the number of returns without taking the design into consideration.

    Change:

    #column-content {
    background: url(images/center-column.png) repeat-y;
    width: 923px;
    float: left;
    padding-bottom: 20px;
    margin-left: 7px;
    }

    to

    #column-content {
    background: url(images/center-column.png) repeat-y;
    width: 923px;
    float: left;
    padding-bottom: 20px;
    position: relative;
    margin-left: 7px;
    }

    And also change:

    .latest-posts {
    width: 220px;
    padding: 10px 10px 10px 20px;
    float: left;
    right: 0;
    }

    to

    .latest-posts {
    width: 220px;
    padding: 10px 10px 10px 20px;
    float: left;
    position: absolute;
    right: 0;
    }
    Thread Starter havingfun

    (@havingfun)

    @potentweb

    You are right again…and thanks again!

    ?? No problem! Been coding for over 10 years so I better be right!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Creativix Theme: Wanna increase amount of articles on the frontpage’ is closed to new replies.