Read More Button

resolved (9 posts) (3 voices)

  1. Dusan22
    Member

    Hi,
    I'm trying to workout how to modify the 'Read More' button that is on the gallery page but I haven't had any luck yet.
    I would like the button to say 'Comment' instead of 'Read More'. Also I would like to move the button to the right side of the thumbnail and move it a bit higher, please see attachment. Hope you can help, thank you.

    Attachments

    1. comment.jpg (82.1 KB, 9 downloads) 4 years old
    Posted 4 years ago #
  2. Hello, Dusan22!

    You have to make changes in that file:
    /wp-content/themes/infocus/template-portfolio-gallery.php line 236

    just replase code:
    <span><a class="button_link" href="<?php the_permalink(); ?>"><span>Read More</span></a></span>

    with this:
    <span><a class="button_link" href="<?php the_permalink(); ?>"><span>Comment</span></a></span>

    To make the button floating right - just change the .button_link properties in your CSS files.

    Posted 4 years ago #
  3. Elliott
    Support

    @MayaS - Thanks for the help! :)

    @Dusan22, Let us know if you get it fixed Dusan22.

    Posted 4 years ago #
  4. Dusan22
    Member

    Thank you MayaS, I managed to fix the first part.
    With the second part, I worked out how to move the button higher but I still can't get the button to the right.
    I'm not the best at CSS could you tell me the line no. that I need to change, thanks heaps.

    Posted 4 years ago #
  5. Elliott
    Support

    Hey Dusan22,

    Open up /wp-content/themes/infocus/lib/includes/template-portfolio-gallery.php and on around line 236 you should see this..

    <span><a class="button_link" href="<?php the_permalink(); ?>"><span>Read More</span></a></span>

    Change it to look like this..

    <span style = 'float: right;'><a class="button_link" href="<?php the_permalink(); ?>"><span>Read More</span></a></span>

    Unfortunately we have to do it this way instead of changing style.css.

    Let us know if this works for you Dusan22.

    Posted 4 years ago #
  6. Dusan22
    Member

    Hi Elliott,
    The code worked, the button is on the right side now, thank you for that.
    Now I'm trying to push the button higher but no luck (please see attachment).
    Do you know what line I have to modify in the css?

    Attachments

    1. up.jpg (76.3 KB, 1 downloads) 4 years old
    Posted 4 years ago #
  7. Elliott
    Support

    Hey Dusan22,

    For this we probably want to do an inline style like we did when we pushed it right. This is so other buttons will not be messed up.

    Let's change our code to this..

    <span style = 'float: right; position: relative; margin-bottom: 20px;'><a class="button_link" href="<?php the_permalink(); ?>"><span>Read More</span></a></span>

    If that does not work then try this..

    <span style = 'float: right; position: relative; top: -20px;'><a class="button_link" href="<?php the_permalink(); ?>"><span>Read More</span></a></span>

    Let us know of the results Dusan22.

    Posted 4 years ago #
  8. Dusan22
    Member

    Hi Elliott,
    Works perfect, exactly what I wanted, thank you very much.

    Posted 4 years ago #
  9. Elliott
    Support

    Glad you got it fixed Dusan22, if you need anything else then let us know.

    Posted 4 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme