Support Forums for LiveMesh Themes & Plugins › Forums › Appdev Theme Support › Editing the "Get this App" button on menu header
Tagged: Get this App button
- This topic has 3 replies, 3 voices, and was last updated 12 years, 5 months ago by
livemesh.
-
AuthorPosts
-
October 29, 2013 at 7:04 am #2495
sq2d
MemberHello,
Is there a way to able to edit the elements of the “Get this App” button (in the menu header) other than in the the file framework/functions/utility-functions.php file itself? I’m trying limit customization away from the core files so that updating the theme with your future updates doesn’t require re-modifying your core files. By editing, I mean changing the text from “Get this App” to something else as needed. Maybe via the custom-functions.php?
I also assume that replacing the iPhone icon would be best done with a customized css style to override the background image?
Regards,
FrankOctober 29, 2013 at 12:22 pm #2501livemesh
KeymasterThe latest update of Appdev includes a child theme that can be used for this purpose. All you have to do is to override the function mo_display_app_button_or_socials() in your child theme’s functions.php. As long as you have a method with the same name, WP will load the child theme’s function and ignore the one which is defined in the parent since there are checks in the parent theme for already defined functions.
You will not see any changes I make to this function in future updates, but if you are customizing, you don’t need those changes anyway.
October 30, 2013 at 1:57 pm #2522iceheart01
MemberHi,
I didn’t understand it very well…can you explain better how can I edit the button? Maybe illustrating it step by step…
Thanks so muchOctober 31, 2013 at 12:51 pm #2533livemesh
KeymasterSteps –
1) Upload the appdev-child.zip file (included in the latest version of Appdev) to your WordPress themes dashboard, just like you upload any other theme.
2) Activate the Appdev child theme. Will refer to the parent Appdev theme for most of its function.
3) Edit the functions.php of the child theme and add a function named mo_display_app_button_or_socials() – just copy the contents of the file from line 755 to 768. See the below screenshot to see what you have to copy.
4) Modify the last line of this function –
echo '' . $button_text . '';
to suit your custom needs. Make this change in the function copied to the child theme’s functions.php file. No need to modify the original source.
5) FTP the changed functions.php to the server. You can also edit this file inline under Appearance->Editor tab but I do not recommend it.
Hope this helps.
-
AuthorPosts
- The forum ‘Appdev Theme Support’ is closed to new topics and replies.