Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    I understand that for the first/last post, the previous/next buttons aren’t working as expected — these buttons shouldn’t show up, but you see a blank button.

    If this was working before, can you confirm if you started reproducing this at some specific point? Do you also reproduce it with only your theme and without plugins installed?

    Thread Starter ildomandatore

    (@ildomandatore)

    The problem occurred when adding padding. No plugins conflict with the theme.

    If you remove the padding, does it work as expected for you?

    Also, you added the padding on the global style for all elements on the site, or for specific blocks?

    Thread Starter ildomandatore

    (@ildomandatore)

    /* Previous game button */
    .post-navigation-link-previous.has-text-align-center.has-text-color.has-white-color.has-background.wp-block-post-navigation-link.wp-elements-89c237fe10869f03a4120b93ffcdb84a {
      border-radius: 30px;
      padding: 11px;
      font-weight: bold;
    }
    
    /* Next game button */
    .post-navigation-link-next.has-text-align-center.has-text-color.has-white-color.has-background.wp-block-post-navigation-link.wp-elements-19ffb721e9ee6cd4e6bb54dac1278c53 {
      border-radius: 30px;
      padding: 11px;
      font-weight: bold;
    }

    By removing the padding, the color of the button is not visible. Because it’s 0 pixels, but it’s a programming error. There should be no active classes and therefore not even see a previous or next button when there are no further articles.

    Hi @ildomandatore! You can add :not(:empty) at the end of your selectors, to only target the ones where there’s actually a link. Your css will change like this:

    /* Previous game button */
    .post-navigation-link-previous.has-text-align-center.has-text-color.has-white-color.has-background.wp-block-post-navigation-link.wp-elements-89c237fe10869f03a4120b93ffcdb84a:not(:empty) {
      border-radius: 30px;
      padding: 11px;
      font-weight: bold;
    }
    Thread Starter ildomandatore

    (@ildomandatore)

    @properlypurple it works, ty!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘button trouble’ is closed to new replies.