• I would like to change the text on my website that shows: Home | Services | About Sandy to customized text. I see that the options in Front Page –> Featured Pages Options only allow the name of the Page to be shown there. How can I change this in the Stylesheet or something?

    My website link is: http://www.themaverickedge.com/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You’ll need to copy /parts/class-content-featured_pages.php to a child theme (eg customizr-child/parts/class-content-featured_pages.php), and then edit the function tc_fp_single_display. Code is around #216.

    I’m not a php expert so can’t advise on exact code.

    #216 was referencing the button text as you asked in here

    Same file to edit for this request. Edit the function at #96

    @satreasure The answer is the same as explained several times in the other thread and at the end of this thread too. (A question doesn’t get any easier by asking it many times.)

    Again, for the button and the headings, this is a php coding exercise that is non-trivial. So either you find someone to code the php, or you need to take a different approach.

    Approach 1 is the approach you’ve already taken, which I think is a good one: to use the featured text to expand on the headings.

    Approach 2, which you suggested in the other thread, but I didn’t pick up on — apologies — is to remove the buttons, which you can do by unpicking the code around lines 215-219 of class-content-featured_pages.php. You can then add your own buttons. The php to remove the buttons is easier than changing what is on each button (but is still beyond my skills, for example).

    Approach 3 would be to change the page titles to be what you want (“You have always been a Maverick”, “Why Mavericks have an Edge”, “How I help you go Maverick”), while leaving the menu items (“Home”, “Maverick”, “Services”) as they are. To do this, you would need to use Appearance > Menus to create custom link menu items.

    Add this code in your child theme’s functions.php, one line above the ending ?>

    add_filter('tc_fp_block_diplay', 'maverick_fp_block_display');
    function maverick_fp_block_display($output) {
    echo preg_replace(
    	array( 	'/'.preg_quote('<h2>Home</h2>','/').'/',
    		'/'.preg_quote('<h2>Services</h2>','/').'/',
    		'/'.preg_quote('<h2>About Sandy</h2>','/').'/'),
    	array(	'<h2>You have always been a Maverick</h2>',
    		'<h2>Why Mavericks Have an Edge</h2>',
    		'<h2>How I help you Go Maverick</h2>'),
    	$output, -1);
    }

    It will replace your current names with the ones you asked. However, if you ever change any of the three page names, they won’t get matched anymore so they won’t get replaced. You’ll need to come to the function and replace the old name with the new one, without touching anything else.

    You can put your description text to better use now.

    Cheers!

    Nice!

    I was hoping you’d come along with the php 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change text in Home Featured Page Options’ is closed to new replies.