Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] Hooks were working well before GP update. After the update Hooks is not working

Home Forums Support [Resolved] Hooks were working well before GP update. After the update Hooks is not working

Home Forums Support Hooks were working well before GP update. After the update Hooks is not working

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #490997
    Juan Carlos

    Hooks were working well before GP update. After the update it is not working. Hooks’ function is to display a custom Header. Before the update the custom header was displaying well, after I did the update the header is not appearing in.
    Also before I updated GP to the new version I updated WordPress to ver 4.9.4.
    <?php
    if ( ICL_LANGUAGE_CODE == ‘en’ ) {
    echo do_shortcode( ‘[INSERT_ELEMENTOR id=”508″]’ );
    } else {
    echo do_shortcode( ‘[INSERT_ELEMENTOR id=”2919″]’ );
    }
    ?>

    Thank you

    GeneratePress 2.0.2
    #491024
    Tom
    Lead Developer
    Lead Developer

    Your code looks fine to me. Which version did you upgrade from/to? We haven’t had an update in a little while now.

    What hook is it added to?

    #491195
    Juan Carlos

    I just updated to 2.0 from 1.5.6. I didn’t do the update when ver 2.0 was release back in December 2017.

    Actually I have two hooks, however the hook place before the footer Content is working.:

    Before Header Content
    <?php
    if ( ICL_LANGUAGE_CODE == ‘en’ ) {
    echo do_shortcode( ‘[INSERT_ELEMENTOR id=”508″]’ );
    } else {
    echo do_shortcode( ‘[INSERT_ELEMENTOR id=”2919″]’ );
    }
    ?>
    Before Footer Content
    <?php
    if ( ICL_LANGUAGE_CODE == ‘en’ ) {
    echo do_shortcode( ‘[INSERT_ELEMENTOR id=”550″]’ );
    } else {
    echo do_shortcode( ‘[INSERT_ELEMENTOR id=”3003″]’ );
    }
    ?>

    #491546
    Tom
    Lead Developer
    Lead Developer

    The inside of your <header> element looks like it’s been altered.

    Any custom functions or page templates on your site?

    #491676
    Juan Carlos

    Hi Tom, I did not add anything or altered anything. I don’t know what to do.

    Thank you

    #491687
    Juan Carlos

    Hi Tom, I just restored the systems file from the date before I did the upgrade and it is working.

    Thank you

    #491812
    Tom
    Lead Developer
    Lead Developer

    Is it still working even when you update now? It’s important to stay up to date with the latest versions.

    #493472
    Juan Carlos

    Hi, I haven’t done the update, I plan to do it this coming week. Any suggestion?

    thank you

    #493702
    Tom
    Lead Developer
    Lead Developer

    Everything should work – hooks themselves weren’t altered in the update at all.

    #548050
    Markus

    Hi Tom,

    same problem here?
    The following code worked well before the 1.6.1 / 1.6.2 update (content area):

    <?php if( is_home() || is_front_page() ) : ?>
    <div id="generate-section-1" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
        <div class="grid-container grid-parent generate-sections-inside-container" itemprop="text">
            <h1 style="text-align: center;"><span style="color: #fff8ea;">Sanie­rungs- und Insol­venz­be­ra­tung <br>ist Ver­trau­ens­sa­che.</span>
            </h1>
        </div>
    </div>
    <div id="generate-section-2" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
        <div class="grid-container grid-parent generate-sections-inside-container" itemprop="text">
            <div class="lgc-column lgc-grid-parent lgc-grid-33 lgc-tablet-grid-50 lgc-mobile-grid-100 lgc-equal-heights">
                <div class="inside-grid-column ">
                    <h2>Fir­men­in­sol­venz &nbsp;droht?</h2>
                    <p>Sie befin­den sich gera­de in einer äußerst schwie­ri­gen oder exis­ten­ti­ell bedroh­li­chen Situa­ti­on? Dann soll­ten Sie <strong>schnell und rich­tig</strong>                    han­deln. Legen Sie das Schick­sal Ihrer wirt­schaft­li­chen Exis­tenz mit allen ver­bun­de­nen Kon­se­quen­zen in die Hän­de eines erfah­re­nen Bera­ters.</p>
                </div>
            </div>
            <div class="lgc-column lgc-grid-parent lgc-grid-33 lgc-tablet-grid-50 lgc-mobile-grid-100 lgc-equal-heights">
                <div class="inside-grid-column ">
                    <h2>Bera­tungs­schwer­punkt:</h2>
                    <p>Mei­ne Kanz­lei hat sich auf die <a href="https://insoguide.de/insolvenzberatung"><strong>Bera­tung von Unter­neh­men und Unter­neh­mern in insol­venz­na­her Situa­ti­on</strong></a> spe­zia­li­siert. Seit über 10 Jah­ren bera­te ich klei­ne und mitt­le­re Unter­neh­men: Frei­be­ruf­ler, Ein­zel­un­ter­neh­men, Per­so­nen- und Kapi­tal­ge­sell­schaf­ten.</p>
                </div>
            </div>
            <div class="lgc-column lgc-grid-parent lgc-grid-33 lgc-tablet-grid-50 lgc-mobile-grid-100 lgc-equal-heights">
                <div class="inside-grid-column ">
                    <h2>Insol­venz und Sanie­rung.</h2>
                    <p>Der Schwer­punkt mei­ner Bera­tung ist die mög­li­che <a href="https://insoguide.de/unternehmenssanierung"><strong>Sanie­rung und Fort­füh­rung</strong></a>des Betrie­bes unter Anwen­dung des Geset­zes zur Erleich­te­rung der Sanie­rung von Unter­neh­men (<span class="caps">ESUG</span>). Als <strong>geprüf­ter ESUG-Bera­ter</strong> bera­te und beglei­te ich Sie bei einer Insol­venz in Eigen­ver­wal­tung.</p>
                </div>
            </div>
            <div class="lgc-clear"></div>
        </div>
    </div>
    <div id="generate-section-3" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
        <div class="grid-container grid-parent generate-sections-inside-container" itemprop="text">
            <h1 style="text-align: center;"><span style="color: #fff8ea;">Der Zeit­fak­tor als Feind der Sanie­rung.</span></h1>
        </div>
    </div>
    <div id="generate-section-4" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
        <div class="grid-container grid-parent generate-sections-inside-container" itemprop="text">
            <div class="lgc-column lgc-grid-parent lgc-grid-33 lgc-tablet-grid-50 lgc-mobile-grid-100 lgc-equal-heights">
                <div class="inside-grid-column ">
                    <h2>Per­sön­li­che Haf­tung?</h2>
                    <p>Als Geschäfts­füh­rer befin­den Sie sich vor der Insol­venz in einer höchst ange­spann­ten Lage und wer­den in der Regel die viel­fäl­ti­gen <strong><a href="https://insoguide.de/insolvenzberatung/persoenliche-materielle-haftung-insolvenz">Haf­tungs­fal­len</a></strong> nicht erken­nen.</p>
                    <p>Wäh­rend mei­ner lang­jäh­ri­gen Bera­tungs­pra­xis habe ich immer wie­der erschre­ckend fest­stel­len müs­sen, wie gering die Kennt­nis­se über die Pflich­ten­la­ge des Geschäfts­füh­rers in der Kri­se sind, die im schlimms­ten Fall <strong><a href="https://insoguide.de/insolvenzberatung/insolvenzstrafrecht" target="_self">straf­recht­li­che Kon­se­quen­zen</a></strong> haben.</p>
                </div>
            </div>
            <div class="lgc-column lgc-grid-parent lgc-grid-33 lgc-tablet-grid-50 lgc-mobile-grid-100 lgc-equal-heights">
                <div class="inside-grid-column ">
                    <h2>Insol­venz­ver­schlep­pung?</h2>
                    <p><strong>Die weit­aus meis­ten </strong> Insol­venz­an­trä­ge wer­den zu spät gestellt, <strong>                        <a href="https://insoguide.de/insolvenzverschleppung">Insol­venz­ver­schlep­pung</a></strong> ist inzwi­schen die am häu­figs­ten ver­folg­te Wirt­schafts­straf­tat.</p>
                    <p>Dabei haben sich mit der Reform durch das <span class="caps">ESUG</span> völ­lig neue Mög­lich­kei­ten der               <a href="https://insoguide.de/unternehmenssanierung">                        <strong>Über­win­dung von Kri­sen</strong></a> durch eine Sanie­rung unter dem Schutz­schirm des Insol­venz­rechts erge­ben. Die Chan­cen für eine erfolg­rei­che Sanie­rung sind umso grö­ßer, je frü­her der Antrag gestellt wird.</p>
                </div>
            </div>
            <div class="lgc-column lgc-grid-parent lgc-grid-33 lgc-tablet-grid-50 lgc-mobile-grid-100 lgc-equal-heights">
                <div class="inside-grid-column ">
                    <h2>Kos­ten­lo­se Erst­be­ra­tung.</h2>
                    <p>Ver­mei­den Sie unnö­ti­ge Risi­ken und las­sen Sie sich in der Kri­se, vor dem <strong><a href="https://insoguide.de/regelinsolvenz#ablauf-des-regelinsolvenzverfahrens">Insol­venz­ver­fah­ren</a></strong> oder bei ein­ge­tre­te­ner Insol­venz von mir bera­ten.</p>
    				<p>Ich bie­te Ihnen kos­ten­los eine sofor­ti­ge, indi­vi­du­el­le und qua­li­fi­zier­te Erst­be­ra­tung an. In einer mehr­stün­di­gen Bera­tung erhal­ten Sie eine Erst­ana­ly­se und mög­li­che Ansät­ze für eine <strong>außer­ge­richt­li­che Sanie­rung</strong> oder eine <strong>Sanie­rung durch Insol­venz</strong>.</p>
                </div>
            </div>
            <div class="lgc-clear"></div>
        </div>
    </div>
    <div id="generate-section-5" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
      <div class="grid-container grid-parent generate-sections-inside-container" style="text-align: center;font-style: normal">
            <a class="button red" href="https://insoguide.de/insolvenzberatung/kostenlose-erstberatung"><i class="fa fa-mouse-pointer"></i>&nbsp;Kos&shy;ten&shy;lo&shy;se anwalt&shy;li&shy;che Erst&shy;be&shy;ra&shy;tung zu Insol&shy;venz und Sanie&shy;rung.</a><br>
            <a class="button blue" href="tel:+493050564779"><i class="fa fa-phone fa-fw fa-inverse"></i>&nbsp;(030) 5056 4779 &nbsp;</a>&nbsp;<a class="button blue" href="https://insoguide.de/kontakt"><i class="fa fa-flash fa-fw fa-inverse"></i>&nbsp;Blitz&shy;kon&shy;takt &nbsp;</a>
        </div>
    </div>
    <div id="generate-section-6" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
        <div class="grid-container grid-parent generate-sections-inside-container" itemprop="text">
            <h1><span>Insolvenz-Nachrichten</h1>
        </div>
    </div>
    <div id="generate-section-7" class="grid-container grid-parent generate-sections-container enable-parallax" data-speed="6">
        <div class="grid-container grid-parent generate-sections-inside-container" itemprop="text">
        </div>
    </div>
    <? endif; ?>
    

    This displays a custom section on the startpage (blog page) of https://insoguide.de

    Any idea why?

    Best,
    Markus

    #548581
    Tom
    Lead Developer
    Lead Developer

    Which hook is that in?

    This is incorrect: <? endif; ?>

    It should be: <?php endif; ?>

    #548809
    Markus

    Tom,

    you’re making my day!
    ‘<?php endif; ?>’
    is right. Thanks.

    Funny, but this crufty buggy thing worked since 2 years!
    😉

    Which hook is that in?

    (content area):

    You are my hero, man.

    #548955
    Tom
    Lead Developer
    Lead Developer
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.