Hi,
Where I have to go to change Read More text in Awake slider button?
Thank You
(20 posts)
(5 voices)
Hi,
Where I have to go to change Read More text in Awake slider button?
Thank You
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.
Fine!
Thank you Elliott for your quick reply and your precious help as usual
Glad that worked for you gjfo, if you have any other questions then let us know.
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');
?>
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.
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"
Ok, I also tried this for line 12:
<?php if($home_slider_page) {child_header_slider_switcher($homepage_slider); } ?>
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.
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.
Could you please try copying the file page.php and paste it in your child theme folder?
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.
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?
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.
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.
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.
You must log in to post.