• Resolved Acal

    (@acal)


    Hi I struggled to find a way to unhook, unplug or filter out an undesired behavior/function in minamaze. Specifically, when I was using categories I was getting an h1 header with “Archive Category:” appended before the category title and another similar and related issue found in the associated breadcrumb for that view. I’ll omit the breadcrumbs aspect for this discussion but all the info you need to fix it is provided through reference.

    I found a prior resolution on wordpress.org by user Kurczak who found the function locations for the “bad behavior.” Thanks!!!https://wordpress.org/support/topic/h1-and-breadcrumb-category-archives?replies=2

    The problem with that method was that it would unfortunately get over-written upon the next parent theme update since it required a mod to the parent theme file. One thing that also occurred to me was that the parent theme did not have plugs, filters or actions available for that particular behavior, so that my child functions.php could not override the parent behavior.

    I eventually realized that the parent theme called thinkup_custom_intro(), the primary function producing the bad behaviour, through the header.php file! Since WP allows child templates to default over parent templates it allows us to rename the function call to whatever name we want. We can now modify/update the original parent code as per our particular desires. Here’s how I did it and it is easy to do through WP theme editor or FTP.

    Go to directory: minamaze > admin > main > options > 01.general-setting. Find and copy the “Intro Default” section containing the parent functions “thinkup_custom_intro()” and “thinkup_title_select()” and paste into your child’s functions.php file.

    Rename both functions to “thinkup_custom_intro_child()” and thinkup_title_select_child() respectively. Leaving behind the remaining code allows you to tweak these values in the future as well. Just be sure to change all function names and calls to the [old]_[new] taxonomy.

    In the header.php file make sure to rename the function call thinkup_custom_intro() to thinkup_custom_intro_child().

    This solved my problem and now the child theme is made more robust by having a stable override to the parent theme!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Please mark as resolved in right side drop down.

    Thanks

    I tried the method suggested here. Although the correct title did appear on my blog posts page and all other pages of the site worked OK, I was not able to login to the administrative area of the site. I received error messages saying the header had already been loaded from my customized functions.php and therefore something from pluggable.php could not load.

    I went back to simply making a change in the file of the parent theme, although this does have the disadvantage of having to be edited every time the theme is updated.

    So I would say this issue is NOT resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modify Minamaze Parent Intro Defaults’ is closed to new replies.