April 13, 2021 at 11:08 UTC - Views: 94 #67986Answeredgbcc_GhaParticipant
I gather, on single pages I can replace the existing footer HTML with a new one using Content -> Header / Footer HTML Content -> Footer HTML.
How do I do the same on a post single page since the above box is missing?
Cheers,April 13, 2021 at 14:51 UTC - Views: 94 #67987WeaverKeymaster
The post single page view does not have that option as you noted. The closest thing would be using a replacement widget for the single view supported by Weaver Xtreme Plus. This is per post option, so you’d need that do that for every post.
There is no way to globally provide alternative widgets or html content that shows on the post single view page for all posts.
If you know PHP, one could create a child theme with custom code for the footer, but that is very non-trivial.April 13, 2021 at 15:24 UTC - Views: 85 #67988
Re.: “The closest thing would be using a replacement widget for the single view supported by Weaver Xtreme Plus.”
How do I do that?April 13, 2021 at 16:28 UTC - Views: 100 #67990
Not 100% sure which exact method weaver was referring to, but here are a number of ways you can add content in the footer area of single post pages.
That said we would need more details, like
- Do you want the same content on all single post pages, or different content for each post
- Are you using the footer widget area on other pages?
1) For example, if needing the same content on all single post pages and not already using the footer widget area, you could use the footer widget area and we could hide it on all non-single post pages.
2) If already using the footer widget area for something else, but still wanting the same content on all Single post pages, we could use a Per Page Extra widget area to change the content of the Footer widget area on single post page, using the single page view Widget area replacement found in the Post single page options tab of post editing pages.
- You first create a Per Page Extra widget area by dropping a name (like PostFooter) in Main options > Sidebar & Layout > Define Per Page Extra Widget Area box
- Then go to appearance > Widget, and put the content you need for the single post page footer widget area in the newly created area that will show up as Per Page Area PostFooter
- Last you go to the post editing page > Xtreme option for this page > Post Single Page options TAB > Single page view: Widget Area Replacement, and select the PostFooter widget area as a replacement for the footer widget area
3) Finally, we could use one of the many HTML Insertion areas like the prefooter area only on the single post page using a post custom field.
Below are all the areas available
And below is how to use them on single post page using a Custom Field.April 13, 2021 at 16:30 UTC - Views: 78 #67992WeaverKeymasterApril 13, 2021 at 17:16 UTC - Views: 76 #67993
For good or for bad, I’d placed all infos like “imprint” or “provacy policy” in the footer HTML and they appear on all pages and all posts. All in German.
Now, I bought a multilingual plugin and started to translate few pages and posts into English. The plugin fails to translate the footer-html content though. My workaround is described above and works for the translated pages but not for the translated posts.
As a solution I put the new english text in a replacer of “Footer Widget Area”. It apears then above the footer html (with the German text), which still apears as well and I don’t know how to get rid of it. I’m not sure but a pre oder post footer area replacer seem not to replace the html-footer section, innit?April 13, 2021 at 18:11 UTC - Views: 64 #67994
I am not 100% clear on the whole scenarios here, you may want to elaborate…
Give us a detailed description of what would be the ideal behavior for the various pages/content, regardless of the solutions you tried.
Also, please provide a link to the page with the content you need to hide and be specific of what content and under what conditions it needs too be hidden!April 13, 2021 at 19:21 UTC - Views: 64 #67996
Please see the footer area of this post:
The text starting with “Imprint […]” is what I want. Here, it is placed in the Footer Widget Area.
The text I want to get rid of IN THIS POST ONLY (or ideally replaced with the text above) is the German text starting with “AGB […]”. This text stems from Admin -> Main Options -> Footer -> Footer HTML -> Footer HTML contentApril 13, 2021 at 21:23 UTC - Views: 51 #67997
OK. One more thing I am confused about is the replacement logic.
Is replacing the German content ABG—Chafari with the English content Imprint — Chafari something that should be related to people selecting English or German, or just related to that post that should always show the English content ?April 14, 2021 at 07:07 UTC - Views: 57 #67999
It is related to people selecting English. In that case, they can see only the (few) pages and posts that are already translated. The issue is: The translation plugin creates an English version of the menu, widgets, and everything else that I choose to translate. If someone selects English, then the English versions of the menu and widgets are shown. Therefore, if the German footer text were in a footer widget, I would have translated it into English and I wouldn’t need to find a solution. As said before, unfortunately the HTML footer is not covered by the plugin and remains as it is.
Theoretically, all could be easily solved when I transfer the footer info from currently html footer to a widget footer. I’m reluctant to because typically I hide all widget areas I don’t need when I create a new page or a new post. Hence, I’d have to visit every existing (German) page and post and make sure the area is not hidden. And there are many!April 14, 2021 at 15:58 UTC - Views: 40 #68004
From what you are saying, it looks like the language plugin works on widgets but not raw HTML content.
If that is the case, before we make a CSS hack to hide the German piece on the English page, do you have the Xtreme Plus plugin.
If you do, then, instead of inserting the German menu as content inside the Footer HTML area, put it in a Widget, and then insert the Widget inside the Footer HTML area using the Xtreme plus Widget Shortcode.
If you do not have Plus or if that does not work, install a plugin called Widget Shortcode, that allows you to do the same, which is insert a widget anywhere using a shortcodeApril 14, 2021 at 16:32 UTC - Views: 33 #68008
Oh, that sounds good! Yes, I have the “Weaver Xtreme Plus” plugin, if that is what you mean. More than happy to give it a try. Do I proceed as you’d described avove in option no. 2?April 14, 2021 at 16:43 UTC - Views: 35 #68009Best AnswerscramblerModerator
This reply has been accepted as the best answer.
Yes, Create a Per page widget area named PostFooter
Then go to appearance > Widget and put a Custom HTML Widget in the newly created Widget area, In the Custom HTML Widget, put the HTML content that you now have in the Footer HTML Area.
Once that is done, goo to the Footer HTML Area, and replace the HTML by the Xtreme plus widget shortcode
That would insert the same content as before, but coming from a widget area and widget.
Next try to make your language plugin do the translation replacement on the widget as you say you can do it on other widgetsApril 14, 2021 at 17:49 UTC - Views: 23 #68012
Damn! All worked well just as you’d described it. But: The translation plugin still doesn’t find the text. Apparently, main “official” widgets only.April 14, 2021 at 18:03 UTC - Views: 21 #68013
What is the mechanism offered by the plugin to switch widget on translation?
Do you create two version of a widget and flag them with the language.
Have you tried contacting the plugin developer too see if they can switch any widgets?April 14, 2021 at 18:33 UTC - Views: 20 #68014
Eureka! I had the idea it might be because I used a pure “html” field instead of a html input mode of a “text” field. And that was it! That seems to be the mechanism. Now, I got it translated and it seems to work well. Thank you very much for your kind efforts.
- You must be logged in to reply to this topic.