Forum Replies Created

  • In reply to: Replacing parent function in child theme

    #27696

    Yes, I understand that. Thanks again very much for your help!

    Switched to “resolved”..

    PS

    Your code works as expected, the template_redirect hook was the key, thanks again!

    In reply to: Replacing parent function in child theme

    #27694

    Thank you very much Syahir!

    I’ll try your code.

    Anyway, if the funtion will be pluggable in 1.7.1, I can also just hack the current version of graphene_column_mode() with the conditional function_exists() and be sure that I’ll have no problems with future updates.

    Is that correct?

    In reply to: Replacing parent function in child theme

    #27692

    I’ve been working on other projects, no news here?

    I can confirm that, looking inside graphene_column_mode() function, is not present an option to chose the template for single post view. It can be done only for pages and for bbPress forum, if installed.

    In reply to: Replacing parent function in child theme

    #27691

    That would be great but I didn’t find a similar option in the back-end.

    I’m aware of the possibility to choose the layout on a page basis, but that is not enough for my purpose. I need it to be the default behavior for pages.

    Furthermore for single posts that option is not available at all to my eyes.

    Am I missing something?

    In reply to: Replacing parent function in child theme

    #27689

    Kenneth, about your first question, I don’t need to include other templates. I just want to have a 3 columns layout in home page, and a 2 columns layout in single posts and maybe somewhere else (I’m still working on the design).

    I know that this function is available all time, that’s the problem for me to override and replace it. Without the function_exists() conditional I get the Cannot redeclare graphene_column_mode() error, and I cannot just change the header.php file (where the function is called) in my child theme (to use a child function with a different name), because that function is (about) 4 steps later in the code, after a chain of 3 functions before it.

    I’ve already added the conditional in teme-utils.php for testing my mod, and everything works exactly like i want after that.

    After all it’s just a line of code to add, and there is a wordpress tip for developers that asks to add the conditional to every function, to make them pluggable.

    In reply to: Comment Issue

    #27739

    I’ve done the test on my local installation and also on a web installation where I’m building a new site, and I don’t have the same behavior.

    All works normally…

Viewing 6 posts - 11 through 16 (of 16 total)

  • 1
  • 2