Tagged: x
-
AuthorPosts
-
September 29, 2016 at 2:51 pm #1196246
yanuncParticipantHi there,
i would like to put default back button in the center bottom of my single post with x child theme FUNCTIONS.PHPThanks in advance for any help offered!
September 29, 2016 at 7:40 pm #1196529
DarshanaModeratorHi there,
Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Then add the following code into your functions.php file.
add_action( 'x_after_the_content_end', 'add_to_single_posts' ); function add_to_single_posts() { if ( is_single() ) { echo "<a href='http://your.link/to/blog' class='btn center-text'>Back</a>"; } }Hope that helps.
September 30, 2016 at 12:58 am #1196938
yanuncParticipantthanks that great
but how can i style this button?
Thanks in advance
September 30, 2016 at 1:08 am #1196945
RadModeratorHi there,
What styling do you like to apply? Example, we can apply X button class name like this
add_action( 'x_after_the_content_end', 'add_to_single_posts' ); function add_to_single_posts() { if ( is_single() ) { echo '<a href="http://your.link/to/blog" class="x-btn x-btn-flat x-btn-pill x-btn-regular x-btn-block">Back</a>'; } }Thanks!
September 30, 2016 at 10:57 am #1197457
yanuncParticipantthanks great!
September 30, 2016 at 1:19 pm #1197628
JoaoModeratorGlad to hear we managed to help,
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1196246 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
