Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Tagged

More space in main page? how to add other space like featured posts???
  • I have a football blog and i would like to add more space for more stuff like videos, thumbtail for gossip (bottom), formations, a string with the logos of each team...
    but arras 1.5.1.2 permit you to have only 4 featured posts. how can i add more??? before opening this topic i search and didnt find anything, but it must be a way so resolve this.
    hope to find someone who help me.
    thank you & greatings from Italy
  • Hi,
    i add some featured post and it's looklike working well.
    To do this i search the word "featured1" and i copy/paste it and juste change "featured1" by "featured3"
    So i modify this page :
    -------------------------------------------------------
    -------------------------------------------------------
    /Arras/library/admin/templates/arras-home.php
    -------------------------------------------------------
    -------------------------------------------------------

    <?php _e('Featured Posts #1', 'arras') ?> <?php echo arras_form_checkbox('arras-enable-featured1', 'show', arras_get_option('enable_featured1'), 'id="arras-enable-featured1"') ?>


    <?php _e('Selected Post Type', 'arras') ?><?php echo arras_get_posttype_name(arras_get_option('featured1_posttype')) ?><?php _e('Title', 'arras') ?><?php echo arras_form_input(array('name' => 'arras-layout-featured1-title', 'id' => 'arras-layout-featured1-title', 'style' => 'width:60%', 'value' => arras_get_option('featured1_title') )) ?><?php printf( __('Stickied Posts / %s', 'arras'), arras_get_taxonomy_name(arras_get_option('featured1_tax')) ) ?><?php echo arras_form_dropdown('arras-cat-featured1[]', arras_get_terms_list(arras_get_option('featured1_tax')), arras_get_option('featured1_cat'), 'class="multiple" multiple="multiple"' ); ?><?php _e('Selected categories will be shown below the featured slideshow of the index page.', 'arras') ?><?php _e('Tapestry (Display Type)', 'arras') ?><?php echo arras_form_dropdown('arras-layout-featured1-display', arras_get_tapestries_select(), arras_get_option('featured1_display')); ?><?php _e('Post Count', 'arras') ?><?php echo arras_form_input(array('name' => 'arras-layout-featured1-count', 'id' => 'arras-layout-featured1-count', 'size' => '5', 'value' => arras_get_option('featured1_count'), 'maxlength' => 2 )) ?> <?php ' ' . _e('posts', 'arras') ?>


    -------------------------------------------------------
    -------------------------------------------------------
    /arras/library/admin/templates/posttype_page.php
    -------------------------------------------------------
    -------------------------------------------------------




    <?php echo arras_form_dropdown( 'arras-posttype-featured1', $posttypes_opt, arras_get_option('featured1_posttype') ); ?>



    -------------------------------------------------------
    -------------------------------------------------------
    /arras/library/admin/templates/taxonomy_page.php
    -------------------------------------------------------
    -------------------------------------------------------




    <?php echo arras_form_dropdown( 'arras-taxonomy-featured1', arras_get_taxonomy_list(arras_get_option('featured1_posttype')), arras_get_option('featured1_tax') ); ?>



    -------------------------------------------------------
    -------------------------------------------------------
    /arras/library/admin/options.php
    -------------------------------------------------------
    -------------------------------------------------------

    var $enable_featured1, $featured1_title, $featured1_cat, $featured1_display, $featured1_count;

    and here

    // Custom Post Types & Taxonomies
    var $slideshow_posttype, $featured1_posttype, $featured2_posttype, $news_posttype;
    var $slideshow_tax, $featured1_tax, $featured2_tax, $news_tax;

    -------------------------------------------------------
    and here too...
    -------------------------------------------------------

    'enable_featured1' => true,
    'featured1_title' => __('Featured Stories', 'arras'),
    'featured1_cat' => 0,
    'featured1_display' => 'default',
    'featured1_count' => 3,
    -------------------------------------------------------
    here ...
    -------------------------------------------------------
    'featured1_posttype' => 'post',

    and last this
    $this->enable_featured1 = isset($_POST['arras-enable-featured1']);
    $this->featured1_title = (string)(stripslashes($_POST['arras-layout-featured1-title']));

    if (isset($_POST['arras-cat-featured1'])) {
    $this->featured1_cat = $_POST['arras-cat-featured1'];
    } else {
    $this->featured1_cat = null;
    }

    $this->featured1_display = (string)$_POST['arras-layout-featured1-display'];
    $this->featured1_count = (int)stripslashes($_POST['arras-layout-featured1-count']);

    -------------------------------------------------------
    another one
    -------------------------------------------------------

    $this->_chain_update_posttypes( $this->slideshow_posttype, (string)$_POST['arras-posttype-slideshow'], $this->slideshow_tax, $this->slideshow_cat );

    -------------------------------------------------------
    this one too
    -------------------------------------------------------
    if ( $this->featured1_tax != (string)$_POST['arras-taxonomy-featured1'] ) {
    $this->featured1_tax = (string)$_POST['arras-taxonomy-featured1'];
    $this->featured1_cat = null;
    }

    -------------------------------------------------------
    Well its ok for this file
    -------------------------------------------------------

    -------------------------------------------------------
    -------------------------------------------------------
    /arras/library/actions.php
    -------------------------------------------------------
    -------------------------------------------------------


    /**
    * Called before the featured post (#1) in the index page
    * @since 1.4.3
    */
    function arras_above_index_featured_post() {
    arras_above_index_featured1_post();
    }

    /**
    * Called before the featured post #1 in the index page
    * @since 1.5
    */
    function arras_above_index_featured1_post() {
    do_action('arras_above_index_featured1_post');
    }


    -------------------------------------------------------
    -------------------------------------------------------
    /arras/library/widgets.php
    -------------------------------------------------------
    -------------------------------------------------------

    case 'featured1':
    $list = arras_get_option('featured1_cat');
    $post_type = arras_get_option('featured1_posttype');
    $taxonomy = arras_get_option('featured1_tax');
    break;

  • -------------------------------------------------------
    -------------------------------------------------------
    /arras/home.php or in your custom page
    -------------------------------------------------------
    -------------------------------------------------------

    $featured1_cat = arras_get_option('featured1_cat');

    -------------------------------------------------------

    $featured1_count = (int)arras_get_option('featured1_count');

    and the loop

    <?php if ( $featured1_cat !== '' && arras_get_option('enable_featured1') ) : ?>
    <?php arras_above_index_featured1_post() ?>


    <?php if ( arras_get_option('featured1_title') != '' ) : ?>
    <?php _e( arras_get_option('featured1_title'), 'arras' ) ?>

    <?php endif;<br />
    arras_featured_loop( arras_get_option('featured1_display'), apply_filters('arras_featured1_query', array(
    'list' => $featured1_cat,
    'taxonomy' => arras_get_option('featured1_tax'),
    'query' => array(
    'posts_per_page' => $featured1_count,
    'exclude' => $post_blacklist,
    'post_type' => arras_get_option('featured1_posttype')
    )
    ) ) );
    ?>

    <?php endif ?>

    ------------------------------------------------------
    -------------------------------------------------------
    Actualy i've got 12 featured post and it's work very well.
    just duplicate and rename

    Have fun to tweak !

    Houpela
  • thanx a lot. really hopeful. im going to try it now and than i will tell you. thanx
  • Hi houpela
    Thank you very much! i followed very closely and i managed to get it 90% correct... But 1 small problem here...
    in my wp-admin > arras > Theme options > Home
    Under: Stickied Posts / Categories
    I can't choose my categories. please click the link below and you will understand..
    http://sg-condo.com/download/featured-posts-3-error.jpg

    Please help.. :)
  • Doesn't work. Shows the same category as featured post 1 no matter what. The option in arras home is not working either as bryangbk mentioned.

    http://sg-condo.com/download/featured-posts-3-error.jpg


    "houpela " show your website and lets see how its doing.
  • I found a different method that only needs to be done in one file and modified once.

    /library/postviews.php

    find this function:

    public function register_sections() {

    and inside it you'll find the existing featured-posts-1

    $this->add_section( 'featured-posts-1', 'home', array (
    'label' => __( 'Featured Posts #1', 'ar2' ),
    'title' => __( 'Featured Posts', 'ar2' ),
    'type' => 'node',
    'count' => 3,
    'priority' => 4,
    'enabled' => true,
    ) );

    Basically copy it, paste and change the featured-posts-1 to 3 and the priority to whatever priority # you want relative to current priority #'s. Repeat this for however many featured posts you want or need.
  • @jsilvadesign
    thanks for the reply.

    But i dont see this file anymore in arras theme library folder
    /library/postviews.php
    Which version are you using ? I think you are talking about PROJECT AR2 theme.
  • Ah yes, I think you're right.