WordPress.org

Ready to get started?Download WordPress

Forums

Display 'featured post images' only on Home Page, instead on all pages (1 post)

  1. Dealbhai
    Member
    Posted 1 year ago #

    Hi People,

    I have been using 'Techpro' wptheme for my website. I am looking out if you could help me with this - I would want to Display 'featured post images' only on my Home Page, instead of it showing up on all pages of my website.

    Though this theme seemed to be userfriendly - in giving me an option to do this - but it doesn't work fine.

    I do not find featuredpost.php in the editor. But when i do a search - i see featured post being mentioned in default-admin-options.php .

    //
    /*********************************************
    * Layout Options
    *********************************************
    */

    $this->admin_option('Layout',
    '"Read More" Text', 'read_more',
    'text', 'Read More'
    );

    $this->admin_option('Layout',
    'Featured Image Options', 'featured_image_settings',
    'content', ''
    );

    $this->admin_option('Layout',
    'Featured Image Options Homepage', 'featured_image_settings_homepage',
    'raw', '<b>»</b> Options for the featured images in the loop ( homepage, category pages, tag pages, search results and archive pages ).

    '
    );

    $this->admin_option('Layout',
    'Image Width', 'featured_image_width',
    'text', '200',
    array('display'=>'inline', 'style'=>'width: 100px;', 'suffix'=>' px.')
    );

    $this->admin_option('Layout',
    'Image Height', 'featured_image_height',
    'text', '160',
    array('display'=>'inline', 'style'=>'width: 100px;', 'suffix'=>' px.')
    );

    $this->admin_option('Layout',
    'Image Position', 'featured_image_position',
    'radio', 'alignleft',
    array('options'=>array('alignleft' => 'Left', 'alignright'=> 'Right', 'aligncenter'=>'Center') , 'display'=>'inline')
    );

    $this->admin_option('Layout',
    'Featured Image Options Single', 'featured_image_settings_single',
    'raw', '<b>»</b> Options for the featured image in the single post and single page.

    '
    );

    $this->admin_option('Layout',
    'Image Width', 'featured_image_width_single',
    'text', '300',
    array('display'=>'inline', 'style'=>'width: 100px;', 'suffix'=>' px.')
    );

    $this->admin_option('Layout',
    'Image Height', 'featured_image_height_single',
    'text', '225',
    array('display'=>'inline', 'style'=>'width: 100px;', 'suffix'=>' px.')
    );

    $this->admin_option('Layout',
    'Image Position', 'featured_image_position_single',
    'radio', 'alignleft',
    array('options'=>array('alignleft' => 'Left', 'alignright'=> 'Right', 'aligncenter'=>'Center') , 'display'=>'inline')
    );

    $this->admin_option('Layout',
    'Custom Footer Text', 'footer_custom_text',
    'textarea', '',
    array('help' => 'Add your custom footer text. Will override the default theme generated text.', 'display'=>'extended-top', 'style'=>'height: 140px;')
    );
    //

    I am relatively amateur with these codes - but tried few steps which i found on help forums. Could you let me know what do i change on these codes, so that i could see the featured posts only on the home page & not on all pages of my website. Please let me know, if you needed anything more to analyze.

    Appreciate your time to help.

    Many thanks,Suman

    my website - http://www.bangalorenetwork.com

Topic Closed

This topic has been closed to new replies.

About this Topic