Top-Header-area: Adding new hyperlinks via child theme

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support Top-Header-area: Adding new hyperlinks via child theme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26916
    bakwelu
    Member

    I am designing on localhost. I created a new directory in the child theme folder invent-child -> framework -> functions/header-title-area.php. This directory path is similar to what is in the parent theme folder.
    I made modification to the header-title-area.php to include more hyperlinks within the class <ul class= “contact-info”>
    when I refreshed the page and used Show Current Template plugin to view the files been referenced by the current page, I discovered that the header-title-area.php in the parent folder is being called instead of the file in the child theme folder directory.
    Presently the parent theme have phone and email hyperlinks within the

    . When I make the modification in the parent theme folder I see the changes effected. However, I would love to make the modifications that is, to add more hyperlinks via the child theme. I have attached a screenshot of what I hope to accomplish.

    Lastly, Is there a way to disable the shopping cart icon on the home page?

    Any Insight on how to proceed with this would be appreciated.
    Thanks
    Bakwelu

    #26940
    Raghavendra
    Moderator

    The header-title-area.php, unfortunately, cannot be used as a template for changing the code in the child theme. This behavior applies only to page templates and files like loop-course.php etc. which have been marked as template and loaded as such. The child theme file will simply be ignored if the file is not loaded as a template.

    The way to modify the header-title-area.php is simple enough still – you just override the methods in the parent file in your child theme functions.php or any other file included by the functions.php of the child theme.

    So, if you have a method named function mo_display_top_header_area() {} in your child theme with the extra fields you need, it will override the method defined in the parent theme file. Pls give it a try – it works quite well actually.

    This way you don’t have to have the whole file in your child theme – just the methods you need to change would suffice.

    #26947
    bakwelu
    Member
    This reply has been marked as private.
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Top-Header-area: Adding new hyperlinks via child theme’ is closed to new replies.