WordPress.org

Ready to get started?Download WordPress

Forums

Ads between categories in Arras theme (2 posts)

  1. sibili
    Member
    Posted 1 year ago #

    Hi.

    I need to put this code:

    <?php echo adrotate_group(1); ?>

    inside this code:

    public function register_sections() {
    
    /*$this->add_section( 'slideshow', 'home', array (
    			'label'		=> __( 'Slideshow', 'ar2' ),
    			'title'		=> __( 'Slideshow', 'ar2' ),
    			'type'		=> 'slideshow',
    			'count'		=> 6,
    			'priority'	=> 12,
    			'display_types' => array( 'slideshow' ),
    			'enabled'	=> true,
    		) );*/
    		$this->add_section( new AR2_PostViews_Slideshow_Section( $this, 'slideshow', 'home', array (
    			'label'		=> __( 'Slideshow', 'ar2' ),
    			'title'		=> __( 'Slideshow', 'ar2' ),
    			'type'		=> 'slideshow',
    			'count'		=> 6,
    			'priority'	=> 12,
    			'display_types' => array( 'slideshow' ),
    			'enabled'	=> true,
    		) ) );
    
                    $this->add_section( 'news-posts', 'home', array (
    			'label'				=> __( 'News Posts', 'ar2' ),
    			'title'				=> __( 'Latest News', 'ar2' ),
    			'type'				=> 'line',
    			'count'				=> 6,
    			'priority'			=> 11,
    			'enabled'			=> true,
    		) );
    
    		$this->add_section( 'featured-posts-1', 'home', array (
    			'label'		=> __( 'Featured Posts #1', 'ar2' ),
    			'title'		=> __( 'Featured Posts', 'ar2' ),
    			'type'		=> 'node',
    			'count'		=> 6,
    			'priority'	=> 10,
    			'enabled'	=> true,
    		) );

    Between categories.

    If I use it this way:

    $this->add_section( 'news-posts', 'home', array (
    			'label'				=> __( 'News Posts', 'ar2' ),
    			'title'				=> __( 'Latest News', 'ar2' ),
    			'type'				=> 'line',
    			'count'				=> 6,
    			'priority'			=> 11,
    			'enabled'			=> true,
    		) );
    		echo adrotate_group(1);
    		$this->add_section( 'featured-posts-1', 'home', array (
    			'label'		=> __( 'Featured Posts #1', 'ar2' ),
    			'title'		=> __( 'Featured Posts', 'ar2' ),
    			'type'		=> 'node',
    			'count'		=> 6,
    			'priority'	=> 10,
    			'enabled'	=> true,
    		) );

    My ads appears at the top of the homepage.
    In home.php is just placed this code:

    <?php ar2_render_zone( 'home' ) ?>

    So, not possible to add it in home.php

    I am new, so I would appreciate any help.

  2. sibili
    Member
    Posted 1 year ago #

    Site: http://sibili.comyr.com/wordpress/

    I need to place code between Featured Stories and Editors Picks.

    Anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic