WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] Change text within .btn-primary from "Read more" (9 posts)

  1. a_francisco
    Member
    Posted 5 months ago #

    Hello,

    I am wondering if someone may be able to recommend a method for altering the text within the primary buttons. I am having trouble finding the html for the homepage within the multiple php files.

    Can someone point me in the right direction or offer a CSS solution? Or maybe it's even simpler than either of those.

    http://www.coolmemoriesmusic.com

    Thanks!

  2. Piyush
    Member
    Posted 5 months ago #

    You should have to read this link

    http://codex.wordpress.org/Customizing_the_Read_More

  3. Adrian Houle
    Member
    Posted 5 months ago #

    You don't want to alter the theme file because when it gets updated it will overwrite your change.

    The best way to do this would be to use Jquery and replace the element.

    I am however lazy and came up with this lazyman hack. You will need a child theme css sheet, or a built in stylesheet in the theme. Lots of guides on how to make child themes.

    So here it is: (note: this only works if you want to keep the same link location, it is imposible to change the link location with css)

    1. Use the CSS selector :before to select the link

    2. Use the content properties to add the text you want before the link

    3. Set the added text's size to something appropriate. You must use pixels, you cannot use em's.

    4. Set the size of the link to something extremely small, like 0.01em.

    5. Profit.

    #main-wrapper > div.container.marketing > div > div:nth-child(1) > div > p:nth-child(3) > a:before {
    content: "Hello World";
    size: 20px;
    }
    #main-wrapper > div.container.marketing > div > div:nth-child(1) > div > p:nth-child(3) > a {
    size: 0.01em;
    }

    http://www.w3schools.com/cssref/sel_before.asp
    http://www.w3schools.com/cssref/pr_gen_content.asp

  4. Adrian Houle
    Member
    Posted 5 months ago #

    By the way, the reason I could not just use the display property is because the the button is the links background image and so the whole thing disappears. If the button was not a gradient of color I would also change the small texts color to match the background.

  5. rdellconsulting
    Member
    Posted 5 months ago #

    There's a CSS and php solution in this snippet.

  6. a_francisco
    Member
    Posted 5 months ago #

    Thanks everyone!

  7. a_francisco
    Member
    Posted 5 months ago #

    ...

  8. ElectricFeet
    Member
    Posted 5 months ago #

    But I think that the question may have meant to be much much simpler. @a_francisco: are you simply trying to change the default text in the buttons on the slider? If so, it's in Customiz'it > Front Page.

  9. a_francisco
    Member
    Posted 5 months ago #

    Yes, thank you for the clarification. I did not know that changing the button text was as easy as a front page setting, but ultimately my intention was to have different text in the buttons -- two are links to records ("Listen") and the third is to a video ("Watch").

Reply

You must log in to post.

About this Theme

About this Topic