Home › Forums › Free Themes › Education Hub › Three Columns
Tagged: Three Columns
- This topic has 8 replies, 2 voices, and was last updated 8 years, 8 months ago by kmevanish.
-
AuthorPosts
-
April 14, 2016 at 10:20 pm #5654kmevanishParticipant
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.
April 14, 2016 at 11:52 pm #5661wensolutionsKeymasterHello @kmevanish,
Hope you are doing good.
Can you please share your site url so that we could have closer look at it?Thank you.
April 18, 2016 at 12:10 pm #5905kmevanishParticipantHello,
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.
April 18, 2016 at 1:21 pm #5916wensolutionsKeymasterMake 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
April 18, 2016 at 8:52 pm #5939kmevanishParticipantThank 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.
April 19, 2016 at 4:30 am #5951wensolutionsKeymasterHello @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!!
April 19, 2016 at 4:51 pm #5993kmevanishParticipantI 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?
April 19, 2016 at 11:30 pm #6008wensolutionsKeymasterHello @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. Removeendif ;
as well
Hope this will do.
If any problem feel free to post.Regards!!!
April 23, 2016 at 12:04 pm #6277kmevanishParticipantThank you so much 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.