Forums

meed help changing buttons (12 posts)

  1. Ronnie
    Member
    Posted 9 months ago #

    i've got 'Read more' buttons beside the post entries on my Videos page and on my Symbols page.

    Is there a way I can change what the buttons say on the Symbols page only?
    I want these ones to read "Buy Prints"

    http://www.ronniewhittaker.com

  2. irfan_np
    Member
    Posted 9 months ago #

    If you have loop.php go to that
    Else go to index.php

    find <?php the_content(); ?> in it.

    Replace it with <?php the_content('Buy Prints'); ?>

    Irfan

  3. Ronnie
    Member
    Posted 9 months ago #

    i could only find <?php the_content(); ?> within search.php and tag.php. it wouldn't be any of those would it?

  4. irfan_np
    Member
    Posted 9 months ago #

    It can be in home.php , front-page.php , index.php , loop.php , page.php

    Irfan

  5. Ronnie
    Member
    Posted 9 months ago #

    tried them all Irfan and can't find that line within, do you have any other ideas?

  6. irfan_np
    Member
    Posted 9 months ago #

    then try search for
    the_excerpt() in above mentioned files. If it is there,

    Add `function custom_excerpt_more( $more ) {
    return 'Buy Prints';
    }

    add_filter( 'excerpt_more', 'custom_excerpt_more' );
    ` to your functions.php

  7. Ronnie
    Member
    Posted 9 months ago #

    got it in index.php
    where in the functions file should i add the code?

  8. Ronnie
    Member
    Posted 9 months ago #

    does this code replace the_excerpt() within index.php:

    function custom_excerpt_more( $more ) {
    return 'Buy Prints';
    }

    do i add the following to functions.php:

    add_filter( 'excerpt_more', 'custom_excerpt_more' );
    ` to your functions.php

  9. irfan_np
    Member
    Posted 9 months ago #

    Add

    function custom_excerpt_more( $more ) {
    return 'Buy Prints';
    }
    
    add_filter( 'excerpt_more', 'custom_excerpt_more' );

    to the functions.php ..that's all

  10. Ronnie
    Member
    Posted 9 months ago #

    i have the "Read More" buttons on both the Videos and Courses pages too and don't want the text to change there. only in the Symbols page for it to be "Buy Prints" is this possible?

  11. irfan_np
    Member
    Posted 9 months ago #

  12. Ronnie
    Member
    Posted 9 months ago #

    thanks irfan
    i added the code above but it didn't change the text

    to have this on one page only seems is more difficult and thus definitely beyond me

Reply

You must log in to post.

About this Topic

Tags

No tags yet.