• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Inserting a back button on attachment pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Inserting a back button on attachment pages

This topic is: resolved

Tagged: attachment pages, buttons

  • This topic has 15 replies, 4 voices, and was last updated 9 years, 10 months ago by Marcy.
Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • July 10, 2015 at 11:27 am #159022
    tatami
    Participant

    I'm using a portfolio with quite long descriptions so I've included the opening copy followed by a 'Read more' button, which takes the user to the attachment page. Can anyone tell me how I can include on attachment pages a 'Back' button in the same style as the 'Read more' button? I'd really appreciate some help here. Thanks.

    http://aenigma-images.com
    July 13, 2015 at 2:47 pm #159312
    Marcy
    Participant

    It looks like you have this as you describe above. If so, can you please mark it Resolved?
    How to is 7. on this page

    Community Forum FAQs


    Marcy | Amethyst Website Design | Twitter

    July 13, 2015 at 2:51 pm #159313
    tatami
    Participant

    Marcy, thanks for noticing. I've resolved it to an extent but not entirely. What I'd really like to do is style the button so the roll-over color of button matches my theme – i.e. it looks and works like the other buttons on my website. Can you help with that?

    July 13, 2015 at 3:20 pm #159316
    Tom
    Participant

    Hi @tatami,

    Your new button includes a lot of unnecessary inline style code that is not present with the plugin's button on the grid. That kinda gets in the way of matching it to your theme. (not impossible, just more futzing to make it work).

    Could you share with us how you placed the button? PHP/ JS / code / plugin / etc.


    Choose your next site design from over 350 Genesis themes.
    [ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]

    July 13, 2015 at 4:01 pm #159319
    tatami
    Participant

    Tom, thanks for taking an interest. As you can see, I have little experience of coding so I used a button from Shortcode Ultimate and messed around with it until it approximated to what I was looking for.

    This is the shortcode:

    [su_button background="#0b0c0b" size="3" radius="0" Back]Back[/su_button]

    And this is what it references:

    .su-button span {
    text-transform: none !important;
    font-family: Oswald, Arial, sans-serif;
    font-size: 13px;
    font-weight:bold;
    text-align:center;
    background-color: transparent;
    }

    The result is not great, though, and if you could help me get it right I'd be really grateful.

    July 13, 2015 at 4:17 pm #159321
    Marcy
    Participant

    Try adding this just below the CSS above:

    .su-button span:hover {
      background: #28ac86; !important;
    }

    If that doesn't work, then try:

    .single-attachment .su-button span:hover {
      background: #28ac86; !important;
    }

    Marcy | Amethyst Website Design | Twitter

    July 13, 2015 at 5:03 pm #159325
    Tom
    Participant

    Marcy: your code is, of course, on the mark 🙂


    @tatami
    : The style (default) style selected in SU adds an inline border style also, that doesn't want to be messed with. Please try your button with the "flat" style, plus Marcy's CSS to change the color on hover (I'm really surprised that there's no button hover settings in Shortcodes Ultimate.)

    You could also just use a native "button" and use (or mod) your theme styles to suit, or to make all buttons the same.
    (Eleven40 green doesn't match your plugin's button color.)

    <a class="button" href="http://aenigma-images.com/">Back</a>


    Choose your next site design from over 350 Genesis themes.
    [ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]

    July 14, 2015 at 1:53 am #159353
    tatami
    Participant

    Marcy, thank you so much for your suggestions. Both code snippets work and provide a big improvement over what I had originally, except that the button font has reverted to Palatino instead of Oswald.

    Tom, you're right that I'm getting a border when I mouseover the back button. I'd love to get this just right but I'm afraid I'll need you to give me step-by-step instructions for how to do that. Could I persuade you to? I'd really appreciate your help here.

    July 14, 2015 at 2:03 am #159355
    anusorbet
    Member

    Thanks for all of that!

    July 14, 2015 at 9:59 am #159387
    Marcy
    Participant

    To the CSS that you posted, you may need to add !important to anything that doesn't do what you want, like the font. I also added border: none. So it would be:

    .su-button span {
    text-transform: none !important;
    font-family: Oswald, Arial, sans-serif !important;
    font-size: 13px;
    font-weight:bold;
    text-align:center;
    background-color: transparent;
    border: none !important;
    }

    The above is if there are not settings to set the font and remove the border in the plugin.
    And you may still need to add

    border: none !important;

    to the span:hover code I posted above.


    Marcy | Amethyst Website Design | Twitter

    July 14, 2015 at 10:08 am #159390
    tatami
    Participant

    Thanks for getting back to me, Marcy.

    So the code I now have looks like this:

    .su-button span:hover {
    background: #28ac86; !important;
    text-transform: none !important;
    font-family: Oswald, Arial, sans-serif !important;
    font-size: 13px;
    font-weight:normal;
    text-align:center;
    background-color: transparent;
    border: none !important;
    }

    Unfortunately it doesn't quite solve things. While the mouseover font is correct, the steady state font is Palatino. And the mouseover is not picking up the green of my theme. Do you have any more suggestions? Thanks again.

    July 14, 2015 at 4:22 pm #159416
    Marcy
    Participant

    Do you see above that I recommended adding the Oswald font with !important to the
    .su-button span
    (the NO HOVER .su-button span)?

    Style everything you need on that selector - .su-button span - and use !important as needed.

    Only THEN style the .su-button span:hover state; the one that you said worked. You should not need to have a font-family or font-size on the hover, if you have styled them in the span.

    And if you need to use !important in the :hover state, you will need !important for the same declaration in the normal span state.

    So start with this

    .su-button span {
    text-transform: none !important;
    font-family: Oswald, Arial, sans-serif !important;
    font-size: 13px;
    font-weight:bold;
    text-align:center;
    background-color: transparent;
    border: none !important;
    }
    
    .su-button span:hover {
      background: #28ac86; !important;
    }

    And then decide what else you need.


    Marcy | Amethyst Website Design | Twitter

    July 14, 2015 at 4:40 pm #159417
    tatami
    Participant

    Marcy, you've solved it for me except that the mouseover state shows a black border. I tried this:

    .su-button span:hover {
    background: #28ac86; !important;
    border: none !important;
    }

    But the black border persists. Is there a way of getting rid of it?

    I hope I'm not pushing my luck by being so persistent! And thanks again.

    July 15, 2015 at 12:06 am #159447
    Marcy
    Participant

    Add this before the code above. That should do it.

    a.su-button.su-button-style-default {
      border: 0 !important;
    }

    The border: none !important lines in the code above are not needed.


    Marcy | Amethyst Website Design | Twitter

    July 15, 2015 at 1:15 am #159454
    tatami
    Participant

    Marcy, for some reason, it seems necessary to retain the border: none !important lines in the code. But I'm not worried about that because the final line of code you've suggested has got me to where I want to be. I'm really, really grateful for your help and I wish there was some way in which I could reciprocate. Thank you so much.

    July 15, 2015 at 9:33 am #159477
    Marcy
    Participant

    I'm glad it's working for you now!

    Please mark this Resolved. The instructions are 7. in the FAQs at the top of this page.


    Marcy | Amethyst Website Design | Twitter

  • Author
    Posts
Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Inserting a back button on attachment pages’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble