Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hassanshah

    (@hassanshah)

    hi friends,
    Please someone explain to me that how can i create more feature categories in max magazine theme? There are 4 feature categories in theme by default, but i need two more.So please any one help me regarding that problem.

    My site is
    https://www.gujratstudents.com/

    THANKS!

    TO SHOW HOW MANY OF SL?DER WILL SHOWN
    Find this parts ‘posts_per_page=4’ in include/slider.php (fifth and seventh lines) and change the numbers that how many you want to show..

    than

    TO INCREASE THE NUMBER OF feature categories ON SLIDER
    find “maxItemDisplay : 4” part from js/custom.js on maybe 47’th line and change it. Make it 6…

    @hassanshah

    1 got to include folder you find feat_cat1.php to feat_cat4 copy any two files and paste it and rename it feat_cat5.php and so on, open the file and make sure that the no of feat_cat(no) match the file name

    2 go to settings folder open theme-options.php file
    on line 335 create copy paste the above code and rename it

    <div class="field">
    							<label for="max_magazine_options[feat_cat5]"><?php _e('Featured Category 5', 'max-magazine'); ?></label>
    							<?php
    							$categories = get_categories( array( 'hide_empty' => 1, 'hierarchical' => 0 ) );  ?>
    							<select id="feat_cat5" name="max_magazine_options[feat_cat5]">
    								<option <?php selected( 0 == $options['feat_cat5'] ); ?> value="0"><?php _e( '--none--', 'max-magazine' ); ?></option>
    								<?php foreach( $categories as $category ) : ?>
    								<option <?php selected( $category->term_id == $options['feat_cat5'] ); ?> value="<?php echo $category->term_id; ?>"><?php echo $category->cat_name; ?></option>
    								<?php endforeach; ?>
    							</select>
    							<span><?php _e( 'Select the Fiveth featured category.', 'max-magazine' ); ?></span>
    						</div>

    then Come to line 536 in function max_magazine_default_options()
    add 'feat_cat5'=> 0,'feat_cat6'=> 0, after 'feat_cat4'=> 0,

    then in same file i.e theme-options.php in /**
    * Sanitize and validate options
    */
    on line 638
    add this code given below
    ` if( !in_array( $input[‘feat_cat5’], $cat_ids ) && ( $input[‘feat_cat5’] != 0 ) )
    $input[‘feat_cat5’] = $options[‘feat_cat5’];
    if( !in_array( $input[‘feat_cat6’], $cat_ids ) && ( $input[‘feat_cat6’] != 0 ) )
    $input[‘feat_cat5’] = $options[‘feat_cat6’]; `

    THEN SAVE THE FILE

    3 go to index.php page and on line 60 add the code give below

    //include featured category 5
    						if ( max_magazine_get_option( 'feat_cat5' ) != 0) {
    							get_template_part('includes/feat_cat5');
    						}
    
    						//include featured category 6
    						if ( max_magazine_get_option( 'feat_cat6' ) != 0) {
    							get_template_part('includes/feat_cat6');
    						}

    save the file then go to appearances-> themes option-> HomeSetting u will get 2 more featured category

    Hi, i follow these instructions now i have on my site more featured categories but they don’t display the post title and the first 150 characters in the post description.
    Please, help me ??
    Ciao

    hi lorenamb, just check your feat_cat(no).php with the link given below the just ur feat_cat.php file
    download feat_cat.php file
    or just replace ur feat_cat(no).php with them u will get the output

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how can i create more feature categories in max magazine theme?’ is closed to new replies.