hourna
Forum Replies Created
Viewing 8 replies - 1 through 8 (of 8 total)
-
there is no such section in content-entry.php
yes I have inserted the code into functions.php but it is not working. I have placed at the very end of the functions.php:
<?php if ( ! function_exists( 'olsen_light_get_social_networks') ) { function olsen_light_get_social_networks() { return array( array( 'name' => 'facebook', 'label' => esc_html__( 'Facebook', 'olsen-light' ), 'icon' => 'fa-facebook' ), array( 'name' => 'twitter', 'label' => esc_html__( 'Twitter', 'olsen-light' ), 'icon' => 'fa-twitter' ), array( 'name' => 'pinterest', 'label' => esc_html__( 'Pinterest', 'olsen-light' ), 'icon' => 'fa-pinterest' ), array( 'name' => 'instagram', 'label' => esc_html__( 'Instagram', 'olsen-light' ), 'icon' => 'fa-instagram' ), array( 'name' => 'gplus', 'label' => esc_html__( 'Google Plus', 'olsen-light' ), 'icon' => 'fa-google-plus' ), array( 'name' => 'linkedin', 'label' => esc_html__( 'LinkedIn', 'olsen-light' ), 'icon' => 'fa-linkedin' ), array( 'name' => 'tumblr', 'label' => esc_html__( 'Tumblr', 'olsen-light' ), 'icon' => 'fa-tumblr' ), array( 'name' => 'flickr', 'label' => esc_html__( 'Flickr', 'olsen-light' ), 'icon' => 'fa-flickr' ), array( 'name' => 'bloglovin', 'label' => esc_html__( 'Bloglovin', 'olsen-light' ), 'icon' => 'fa-heart' ), array( 'name' => 'youtube', 'label' => esc_html__( 'YouTube', 'olsen-light' ), 'icon' => 'fa-youtube' ), array( 'name' => 'vimeo', 'label' => esc_html__( 'Vimeo', 'olsen-light' ), 'icon' => 'fa-vimeo' ), array( 'name' => 'dribbble', 'label' => esc_html__( 'Dribbble', 'olsen-light' ), 'icon' => 'fa-dribbble' ), array( 'name' => 'wordpress', 'label' => esc_html__( 'WordPress', 'olsen-light' ), 'icon' => 'fa-wordpress' ), array( 'name' => '500px', 'label' => esc_html__( '500px', 'olsen-light' ), 'icon' => 'fa-500px' ), array( 'name' => 'soundcloud', 'label' => esc_html__( 'Soundcloud', 'olsen-light' ), 'icon' => 'fa-soundcloud' ), array( 'name' => 'spotify', 'label' => esc_html__( 'Spotify', 'olsen-light' ), 'icon' => 'fa-spotify' ), array( 'name' => 'vine', 'label' => esc_html__( 'Vine', 'olsen-light' ), 'icon' => 'fa-vine' ), ); } } if ( ! function_exists( 'olsen_light_pagination' ) ): /** * Echoes pagination links if applicable. Output depends on pagination method selected from the customizer. * * @param array $args An array of arguments to change default behavior. * @param object|bool $query A WP_Query object to paginate. Defaults to boolean false and uses the global $wp_query * * @return void */ function olsen_light_pagination( $args = array(), $query = false ) { $args = wp_parse_args( $args, apply_filters( 'olsen_light_pagination_default_args', array( 'container_id' => 'paging', 'container_class' => 'group', 'prev_text' => esc_html__( 'Previous page', 'olsen-light' ), 'next_text' => esc_html__( 'Next page', 'olsen-light' ), 'paginate_links_args' => array() ) ) ); if ( 'object' != gettype( $query ) || 'WP_Query' != get_class( $query ) ) { global $wp_query; $query = $wp_query; } // Set things up for paginate_links() $unreal_pagenum = 999999999; $permastruct = get_option( 'permalink_structure' ); $paginate_links_args = wp_parse_args( $args['paginate_links_args'], array( 'base' => str_replace( $unreal_pagenum, '%#%', esc_url( get_pagenum_link( $unreal_pagenum ) ) ), 'format' => empty( $permastruct ) ? '&page=%#%' : 'page/%#%/', 'total' => $query->max_num_pages, 'current' => max( 1, get_query_var( 'paged' ), get_query_var( 'page' ) ), ) ); $method = get_theme_mod( 'pagination_method', 'numbers' ); if ( $query->max_num_pages > 1 ) { ?> <div <?php echo empty( $args['container_id'] ) ? '' : 'id="' . esc_attr( $args['container_id'] ) . '"'; ?> <?php echo empty( $args['container_class'] ) ? '' : 'class="' . esc_attr( $args['container_class'] ) . '"'; ?> ><?php switch ( $method ) { case 'text': previous_posts_link( $args['prev_text'] ); next_posts_link( $args['next_text'], $query->max_num_pages ); break; case 'numbers': default: echo paginate_links( $paginate_links_args ); break; } ?></div><?php } } endif; add_action( 'the_post', 'full_first_post_in_index' ); function full_first_post_in_index() { global $wp_query; global $more; if( is_home() && $wp_query->current_post == 0 ) { $more = -1; } if( $wp_query->current_post > 0 ) { $more = 0; } }
I think the following section in content-entry.php shows read more button:
<div class="entry-utils group"> <a href="<?php the_permalink(); ?>" class="read-more"><?php esc_html_e( 'Devam?n? Oku', 'olsen-light' ); ?></a> </div>
If I can only put this code in an if condition checking whether if the post is latest, I think it should work.
it is as follows:
<article id="entry-<?php the_ID(); ?>" <?php post_class( 'entry' ); ?> itemscope="itemscope" itemtype="https://schema.org/BlogPosting" itemprop="blogPost"> <?php if ( get_post_type() === 'post' ) : ?> <div class="entry-meta entry-meta-top"> <img url='https://4.bp.blogspot.com/-57EIo_Y1eHY/VJ3EHVx53tI/AAAAAAAAALo/0uimScEKmDk/s1600/dateline(flower).png'/> </div> <?php endif; ?> <?php if ( get_post_type() === 'post' ) : ?> <div class="entry-meta entry-meta-bottom"> <time class="entry-date" itemprop="datePublished" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time> </div> <?php endif; ?> <h2 class="entry-title" itemprop="headline"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h2> <?php if ( has_post_thumbnail() ) : ?> <div class="entry-featured"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail( 'post-thumbnail', array( 'itemprop' => 'image' ) ); ?> </a> </div> <?php endif; ?> <div class="entry-content" itemprop="text"> <?php the_content( '' ); ?> </div> <div class="entry-utils group"> <a href="<?php the_permalink(); ?>" class="read-more"><?php esc_html_e( 'Devam?n? Oku', 'olsen-light' ); ?></a> </div> </article>
<?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'entry' ); ?> <?php endwhile; ?>
This is theme’s loop code in index.php, I guess, if it helps.
Thank you for your help.
However, I am still looking for a free solution.
Thank you for your response.
Can you name that non-free plug-in?
Forum: Themes and Templates
In reply to: HTML not displaying properlyThank you!
Forum: Themes and Templates
In reply to: HTML not displaying properlyI have figured it out. It is because when I press enter, wordpress editor is adding
<br>
. I have removed them and it is good now.
Viewing 8 replies - 1 through 8 (of 8 total)