Home Forums Free Themes Education Hub Three Columns

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #5654
    kmevanish
    Participant

    Hello,

    I would like to have three columns shown on the website that I am creating. I have created 3 posts, and at the bottom, selected “Theme Settings > Choose Layout > Three Columns”. When customizing, I selected Theme Options > Layout Options > Global Layout > Three Columns, but they are not showing. How can I make three columns show?

    Thank you.

    #5661
    wensolutions
    Keymaster

    Hello @kmevanish,
    Hope you are doing good.
    Can you please share your site url so that we could have closer look at it?

    Thank you.

    #5905
    kmevanish
    Participant

    Hello,

    The site url is apexgakuin.com/wp.

    I have also tried Customize > Featured Content > Featured Content Type > Static Front Page Only, 3, Featured Pages, and 3 pages. Please let me know what I can do to make the columns show.

    #5916
    wensolutions
    Keymaster

    Make sure you have ‘Show Home Content’ checkbox enabled in your Customizer option panel

    Check this documentation for it.

    http://themepalace.com/theme-instructions/education-hub-pro/#Howtoshow/hidehomepagecontent?

    Thanks

    #5939
    kmevanish
    Participant

    Thank you, the columns are showing now.

    How can I indent the text in a column?

    “: Our main programs for school-age students for grade improvement and college preparation.

    – College Preparation Classes: TOEFL, SAT, and High School Writing classes
    – Tutoring: ESL, School subjects, and Test prep for all grades
    – After-school program: Homework help and English improvement”

    When editing the page for the column, I clicked on Text and added </br> and <p> within each line.
    I would like for each line to be its own paragraph, and for full text to show.

    Thank you.

    #5951
    wensolutions
    Keymaster

    Hello @kmevanish

    To indent the text in a column you first need to create and activate a child theme. After making a child theme for the parent theme find a file called featured-content.php on Parent theme folder => Inc => hook => Featured-content.php

    After that you will find a function education_hub_get_featured_content_details
    copy the entire function from parent theme into child theme’s functions.php file and try matching with below code and replace the be code shown below:
    Note: Please do edit in child theme.

    $contents[ $cnt ]['excerpt'] = education_hub_the_excerpt( apply_filters( 'education_hub_filter_featured_content_excerpt_length', 40 ), $post ); to $contents[ $cnt ]['excerpt'] = $post->post_content;

    Then you can add your content of the featured page as

    <li>College Preparation Classes: TOEFL, SAT, and High School Writing classes</li>
        <li> Tutoring: ESL, School subjects, and Test prep for all grades</li>
        <li>After-school program: Homework help and English improvement</li>
    and it will display an indented sentence for each <li> tag.

    Hope this will help to resolve your issue.
    Feel free to post if any confusion during the process.

    Best regards!!

    #5993
    kmevanish
    Participant

    I have created a Child Theme:

    <?php
    function theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style )
        );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    
    if ( ! function_exists( 'education_hub_get_featured_content_details' ) ) :
    	/**
    	 * Featured content details.
    	 *
    	 * @since 1.0.0
    	 *
    	 * @param array $input Featured content details.
    	 */
    	function education_hub_get_featured_content_details( $input ) {
    
    		$featured_content_type   = education_hub_get_option( 'featured_content_type' );
    		$featured_content_number = education_hub_get_option( 'featured_content_number' );
    
    		switch ( $featured_content_type ) {
    
    			case 'featured-page':
    
    				$ids = array();
    
    				for ( $i = 1; $i <= $featured_content_number ; $i++ ) {
    					$id = education_hub_get_option( 'featured_content_page_' . $i );
    					if ( ! empty( $id ) ) {
    						$ids[] = absint( $id );
    					}
    				}
    				// Bail if no valid pages are selected.
    				if ( empty( $ids ) ) {
    					return $input;
    				}
    
    				$qargs = array(
    					'posts_per_page' => esc_attr( $featured_content_number ),
    					'no_found_rows'  => true,
    					'orderby'        => 'post__in',
    					'post_type'      => 'page',
    					'post__in'       => $ids,
    				);
    
    				// Fetch posts.
    				$all_posts = get_posts( $qargs );
    				$contents = array();
    
    				if ( ! empty( $all_posts ) ) {
    
    					$cnt = 0;
    					foreach ( $all_posts as $key => $post ) {
    
    							$image_array = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'education-hub-thumb' );
    							$contents[ $cnt ]['images']  = $image_array;
    							$contents[ $cnt ]['title']   = esc_html( $post->post_title );
    							$contents[ $cnt ]['url']     = esc_url( get_permalink( $post->ID ) );
    							$contents[ $cnt ]['excerpt'] = education_hub_the_excerpt( apply_filters( 'education_hub_filter_featured_content_excerpt_length', 40 ), $post ); to $contents[ $cnt ]['excerpt'] = $post->post_content;
    							
    							$cnt++;
    					}
    				}
    				if ( ! empty( $contents ) ) {
    					$input = $contents;
    				}
    			break;
    
    			default:
    			break;
    		}
    		return $input;
    
    	}
    endif;
    ?>

    and resulted in an error: “Parse error: syntax error, unexpected ‘$contents’ (T_VARIABLE) in /home/apexlear/public_html/wp/wp-content/themes/education-hub-child/functions.php on line 65”

    I have added li tags – what should I do?

    #6008
    wensolutions
    Keymaster

    Hello @kmevanish

    Sorry, there was a slight mistake in above code:
    You need to find below code:

    
    $contents[ $cnt ]['excerpt'] = education_hub_the_excerpt( apply_filters( 'education_hub_filter_featured_content_excerpt_length', 40 ), $post );
    

    and replace with below code:

    
    $contents[ $cnt ]['excerpt'] = $post->post_content;
    

    And you need to paste only function not the if ( ! function_exists( 'education_hub_get_featured_content_details' ) ) : condition.
    You need to remove that condition and just copy function only. Remove endif ; as well
    Hope this will do.
    If any problem feel free to post.

    Regards!!!

    #6277
    kmevanish
    Participant

    Thank you so much 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.