[Resolved] Shortcode not working

Home Forums Support [Resolved] Shortcode not working

Home Forums Support Shortcode not working

  • This topic has 13 replies, 3 voices, and was last updated 4 months ago by Fernando.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2177362
    Swadhin

    Hi there,

    I’d like to have the copyright year updated yearly on the footer I created (with Generateblocks) on my generatepress theme. I am leavingthe website in the secret box below and please check the footer sill says copyright year as 2021.

    How to fix this?

    Best regards,
    -Swadhin

    Thank you,
    -Swadhin

    #2177372
    David
    Staff
    Customer Support

    Hi there,

    if you create a Block Element and set the Element Type to: Footer this will a) replace the themes footer and b) provide you with this template tag: {{current_year}} which should display the current year when added inside a Headline Block.

    #2177404
    Swadhin

    Thank you David, it worked. But not on the homepage.

    I would also like to disclose that for the homepage, I set that footer block when I designed the page (not as a block). And may be so, the above shortcode didn’t work on the homepage. Would you like to take a look please?

    P.S. If I will set that block as a “footer hook” (as I have set for the rest of the site) would I have to remove the section I built for the homepage (because it might appear as double) or it will take over?

    -Swadhin

    Thank you,
    -Swadhin

    #2177406
    Swadhin

    David,

    I have now allowed the “hook” to be shown on the entire site (previously it was entire site minus the homepage). Still on the homepage it is not showing the year while it shows on the rest of the page.

    Thank you,
    -Swadhin

    #2177410
    David
    Staff
    Customer Support

    Is the homepage now using the same Block Element as the rest of the site ?
    If it is, then it may just require any server or plugin caches to be cleared.

    #2177435
    Swadhin

    I have set it as you said. I have cleared all cache 🙂

    Thank you,
    -Swadhin

    #2177450
    David
    Staff
    Customer Support

    Odd – you homepage is caching the static string. Can you disable any caches and then check the site in an incognito browser ?

    #2178239
    Swadhin

    So I have disabled the cache and it still has the same issue.., however, I have found the following:

    The footer block (on the rest of the site) is what I had built on the homepage. It is still there on the homepage as a part of the landing page.

    The I copied that part of the landing page (homepage) and created a hook and set it as the site footer for the rest of the site except the homepage (because as we talked, I already had that block on the homepage).

    Now, yesterday when I noticed I didn’t have the current year on the footer I asked your help and it worked for the rest of the site.

    When I now set the hook to display on the entire site (so that I didn’t have to update the year on the homepage every year), I think the footer is staying behind (backseat) the block I created for the homepage (which is 2021 now).

    Should I delete that footer block I built on the homepage so the site footer hook works here and comes front instead of taking a backseat?

    -Swadhin

    Thank you,
    -Swadhin

    #2178261
    Swadhin

    Update:

    I created a staging site and removed the footer block (I originally created for the homepage) so that the footer hook (displaying on the whole site) would take over the homepage as it’s footer too.

    Seems, that it is not the case.

    I went and edited the “element” to display on the “entire site” (it was so previously too) and also another rule to display on the homepage.

    Still the homepage is devoid of the footer.

    Please check the URL of the staging site below. 🙂

    -Swadhin

    Thank you,
    -Swadhin

    #2178264
    Fernando
    Customer Support

    Hi Swadhin,

    The site-footer should appear even if there is already another site-footer.

    See: https://share.getcloudapp.com/E0ugKPQv

    Also see: https://share.getcloudapp.com/JruOnw04

    Both appearing: https://share.getcloudapp.com/NQuN7e8W

    Upon investigation, I can see that there is a CSS code hiding your site-footer.

    See: https://share.getcloudapp.com/z8uL1wyN

    If you disable this code: https://share.getcloudapp.com/P8u18lnW

    As is, the code is coming from litespeed. Can you try disabling this temporarily and see how it goes?

    Try disabling other caching plugins as well.

    Please check if you have a Layout Element as well disabling the Site Footer as such: https://share.getcloudapp.com/E0ugKEWb

    Kindly let us know how it goes.

    #2178289
    Swadhin

    Hi Fernando,

    Thanks a ton for using so many examples to help me understand the situation. I am so surprised that such a huge issue had a very small cause behind it.

    Yes, I had disabled the footer (since I had created the block in the landing page) on that page and so the new footer wasn’t displaying.

    Just activating footer element (in the layout) made it work like a charm.

    Thanks to you & David and please have a great rest of the week you both. 🙂

    Best,
    -Swadhin

    Thank you,
    -Swadhin

    #2178296
    Fernando
    Customer Support

    You’re welcome Swadhin! We’re glad to be of assistance!

    As a side note, I find this very helpful with issues like this: https://share.getcloudapp.com/z8uL1nG2

    Hovering on that would allow you to see active Elements on a specific page. 🙂

    #2178525
    Swadhin

    Thanks for the tip Fernando, I’ll keep that in mind. 🙂

    Thank you,
    -Swadhin

    #2179260
    Fernando
    Customer Support

    You’re welcome Swadhin! Feel free to reach out anytime you’ll need assistance with anything else. 🙂

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.