I am trying to make a button show up only on the first page at the bottom on all screen size. I used position fixed, but it show up on the page below as well. How can I just keep it at the bottom on the first page?
Hi Hung,
Please kindly consider that this is a customization request and outside of our support scope. We will do our best to show how to do it but we will not be able to implement the feature for you.
Please kindly follow the steps below:
- Install the Child Theme.
- Go to X/Pro > Global Blocks.
- Create the button using the Global Block. You can read more about Global Blocks here.
- After finishing the design, copy the shortcode that is generated and show at the top of the Global Block Name.
- Add the PHP code below to the end of functions.php file of your Child Theme:
function tco_shortcode() {
if ( is_home() || is_front_page() ) {
echo '<div class="displat-bottom">' . do_shortcode('[cs_gb id=719]') . '</div>';
}
}
add_action( 'wp_footer', 'tco_shortcode' );
Change
[cs_gb id=719]with the shortcode that you copied on step 4.
- Go to X/Pro > Theme Options > CSS and add the CSS code below:
.displat-bottom {
z-index: 99999;
}
You can add whatever CSS code you see it fit there.
Thank you.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.