Change Read More text in slider button

pending (20 posts) (5 voices)

  1. Hi,

    Where I have to go to change Read More text in Awake slider button?

    Thank You

    Posted 1 year ago #
  2. Elliott
    Support

    Hello gjfo,

    Open up /wp-content/themes/awake/lib/functions/sliders.php and on lines 105 and 225 you can find the "Read More" text which should look something like this,

    if($$slider_link && !$$slider_btn){ $out .= '<p><a class="button_link" href="' .$$slider_link. '"><span>Read More</span></a></p>'; }

    Let us know if that is what you were looking for gjfo.

    Posted 1 year ago #
  3. Fine!

    Thank you Elliott for your quick reply and your precious help as usual

    Posted 1 year ago #
  4. Elliott
    Support

    Glad that worked for you gjfo, if you have any other questions then let us know.

    Posted 1 year ago #
  5. I want to change line 105 of slider.php using a the parent child functions.php approach to make it easy to upgrade to your next version of Awake. I've set up the parent child functions.php according to Codex and entered the following code but text is not changing from Read More to Pricing. Any suggestions much appreciated:

    <?php

    function childtheme_sliderreadmore() { ?>
    if($$slider_link && !$$slider_btn){ $out .= '<p><span>Pricing</span></p>'; }
    $out .= '</div>';
    <?php }
    add_action('wp_slider', 'childtheme_sliderreadmore');
    ?>

    Posted 1 year ago #
  6. Ruderic
    Support

    Hello,

    You can open your new functions.php file, and paste exactly the same slider function as in "lib/functions/sliders.php". For example, if you are using the fading slider, you will have to copy the function named "webtreats_fading_header_slider". Then, rename that function to a custom name and change the button text.

    Now, open the file "page.php" in the root of the theme folder and, in line #12, replace this code:

    webtreats_header_slider_switcher($homepage_slider)

    with:

    your_custom_function_name()

    Hope that helps.

    Posted 1 year ago #
  7. Thanks Ruderic. Your directions are very clear, so I must be doing something dumb.
    Here's what I did:
    1. Copied entire webtreats_fading_header_slider function (lines 8 to 125) from slider.php to functions.php. Then changed function name to child_fading_header_slider and renamed "Read More" text to "Pricing" in functions.php.

    2. Changed line 12 of page.php to this:
    <?php if($home_slider_page) {child_header_slider_switcher(); } ?>

    But the home page slider buttons still say "Read More"

    Posted 1 year ago #
  8. Ok, I also tried this for line 12:

    <?php if($home_slider_page) {child_header_slider_switcher($homepage_slider); } ?>

    Posted 1 year ago #
  9. Ruderic
    Support

    Hi,

    The line #12 of page.php should look like this:

    <?php if($home_slider_page) {child_fading_header_slider(); } ?>

    You have to call your newly created function, the one that generates your custom slider.

    Posted 1 year ago #
  10. Hi

    After following your clear instructions, the page is still getting the "Read More" text from the slider.php file and not the child theme. I've attached some screen shots they should help identify what I'm doing wrong. Thanks.

    Attachments

    1. functionsPHPbottom_2-26-2011_8-20-49_P.jpg (149.4 KB, 0 downloads) 1 year old
    2. functionsPHPtop_2-26-2011_8-20-49_PM.jpg (131.6 KB, 1 downloads) 1 year old
    3. awake_child_folder_2-26-2011_8-43-49_P.jpg (92.8 KB, 0 downloads) 1 year old
    4. theme_folder_2-26-2011_8-43-20_PM.jpg (79 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  11. One last screen shot

    Attachments

    1. pagePHP_2-26-2011_8-16-25_PM.jpg (107.8 KB, 1 downloads) 1 year old
    Posted 1 year ago #
  12. Ruderic
    Support

    Could you please try copying the file page.php and paste it in your child theme folder?

    Posted 1 year ago #
  13. I have put a copy of page.php in the child theme folder but it is still referencing the parent slider.php page.

    I've attached screenshots of the child code.

    Attachments

    1. page-child_2-27-2011_10-18-43_AM.jpg (41.6 KB, 0 downloads) 1 year old
    2. functions-child-bottom_2-27-2011_10-17.jpg (88 KB, 0 downloads) 1 year old
    3. functions-child-TOP_2-27-2011_10-16-59.jpg (32.6 KB, 0 downloads) 1 year old
    4. child-theme-folder_2-27-2011_10-15-05_.jpg (45.3 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  14. Ruderic
    Support

    Could you please try opening the file index.php and, in line #21, also replace the call to the default function with a call to your new function?

    Posted 1 year ago #
  15. Thanks for suggestion. That didn't change the text - just placed a spinning icon below the home page slider. See screenshot of code replacement in index.php.

    Attachments

    1. indexPHP_2-27-2011_10-07-51_PM.jpg (66.6 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  16. Hi skane,
    just a stupid question:
    are you using the Fading slider?

    I'm asking because you'll have to copy/paste a different functions from the lib/functions/sliders.php in case you are using the tabbed or the category slider.

    Posted 1 year ago #
  17. Raspo - I'm using the Partial Staged option. See screen shot. You have great tenacity.

    Attachments

    1. slider-screen_2-28-2011_11-15-06_AM.jpg (40.1 KB, 1 downloads) 1 year old
    Posted 1 year ago #
  18. Hi skane,
    what I mean is, what slider type are you using?
    Fading slider or Tabbed slider?

    Attachments

    1. Slider-type.png (11 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  19. Fading slider.

    Attachments

    1. slider-settings_3-1-2011_2-42-56_PM.jpg (46.4 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  20. Ruderic
    Support

    Hi,

    You should try this: Do the same thing that you did in the pages index.php and page.php, in the files template-full.php and template-left-sidebar.php.

    Posted 1 year 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