Section buttons

Hi,

How can I add “back to top” buttons and “read more” with a link to page?

Regards
Elie

Dear Elie,

Thank you for asking.

In order to achieve that objective, could you please try to do the following?

  1. To add “read more” link, try to edit the content.php file in your child theme
  2. Insert the following code right after <?php the_excerpt(); ?> line

<?php if ( 'post' == get_post_type() ) : ?>
	<a href="<?php echo esc_url(get_permalink()); ?>" class="readmore-btn"><?php echo __('Read More', 'moesia'); ?></a>
<?php endif; ?>

  1. To add “back to top” button, try to add the following function in your child theme’s functions.php file

add_action('tha_footer_bottom', 'moesia_child_back_to_top_button');
function moesia_child_back_to_top_button(){

	?>
		<a class="go-top" href="#page" style="color: #fff;"><i class="fa fa-angle-up"></i></a>

	<?php

}

  1. Apply the following CSS code in your child theme’s style.css

.site-footer{
  position: relative;
}

a.go-top,
a.readmore-btn{
  background-color: #ff6b53;
  color: #fff;
  font-weight: bold;
  padding: 15px;
  display: inline-block;
}

a.readmore-btn:hover{
  background-color: #222;
}  

a.go-top{
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px 15px;
  font-size: 25px;
}


Let me know how it goes.

Regards,
Kharis

Thank you Kharis… but omg… i am not an expert… where and how can i find this child theme?

Regards
Elie

Hello there,

We don’t have a Moesia child theme, yet. You can create your own. Please follow the following resources:

Regards,
Kharis