-
AuthorPosts
-
March 26, 2024 at 12:48 pm #1438344
Hi,
i like to show on some pages a footer that is different to other pages. How is this possible or which is the best approach. For instance different footer where the category changes or with the help of the URL-path.
Thank youMarch 26, 2024 at 9:13 pm #1438373Hey gpweb,
You can hide the footer on individual pages in the Layout menu in the right hand sidebar. You could create a custom footer using a Color Section element for example, and you can save that element as a template, or load the content using the Page Content element for example. There’s no dynamic functionality in the theme which would load different content depending on the URL unfortunately, you might be able to find a plugins which does that for you though.
Best regards,
RikardMarch 29, 2024 at 1:49 pm #1438692Hi Rikard
i know how to check the URL to change something dynamically, but unfortunately i dont know the hook/filter to show not the footer widgets or the whole footer (something like avia_get_option(‘footer_columns’);). Can you give me a hint
Thank youMarch 29, 2024 at 6:24 pm #1438707Hi,
Thanks for the update. I’m not sure I understand your intentions, but you can hide the footer in the Layout menu for each page.
Best regards,
RikardMarch 30, 2024 at 2:00 pm #1438749Hi Rikard,
thanks i know the backend. As i said
Change the footer depending on the URL dynamically. Therefore I need a hook/filter similiar to the the OPtion in the backend to hide the footer.
Best regardsMarch 30, 2024 at 11:25 pm #1438809Hi,
Try the solution in this thread.Best regards,
MikeMarch 31, 2024 at 5:18 pm #1438844Hi Mike,
not really my solution. But when i can add lets say the Footer Column 1 – Widget with
dynamic_sidebar( 'Footer - Column 1' );
how can i remove ‘Footer – Column 2’ . I tried
dynamic_sidebar( 'Footer - Column 2' ) = false;
but thats not working.
Best regardsMarch 31, 2024 at 9:51 pm #1438854Hi,
If you just want to show different widgets in the footer for different pages, I recommend using the plugin Widget Options, it offers a easy way to choose which widgets show on each page.Best regards,
MikeApril 1, 2024 at 7:49 pm #1438926Thanks Mike for the Plugin recommandation,
does that mean there is no programmatic way/hook to remove dynamically widget like ‘Footer – Column 2’ like
dynamic_sidebar( 'Footer - Column 2' ) = false;
(which is not working
Best regardsApril 2, 2024 at 12:19 am #1438939Hi,
Perhaps there is a way around this, but I don’t know how you are usingdynamic_sidebar( 'Footer - Column 1' );
to display a specific widget on a specific page, but it seems like re-inventing the wheel when there is a plugin that will add this option to your widgets already.
I would imagine that you would use an IF statement to check the page ID and your “else” would be empty or a different widget for when the IF statement was not true, so in this case you don’t need to “remove” the widget, it just would not show in the first place, that is the approach that makes the most sense.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.