Forum Replies Created
-
AuthorPosts
-
June 14, 2021 at 10:31 pm in reply to: Featured Image in the post not appearing while sharing on WhatsApp. #9609Aakash ChakravarthyKeymaster
Hi,
Thanks for using WP Socializer. The featured image you see on “social networks” should be added separately via special tags called “open graph” at the top of the page. Social networks use this information to get the image.
WP Socializer does not add this. You can this open graph like described in the guide below.
https://www.wpbeginner.com/wp-themes/how-to-add-facebook-open-graph-meta-data-in-wordpress-themes/
Thanks,
AakashAakash ChakravarthyKeymasterOk.. I didn’t notice that you are using “immediate” display. In that it will be shown. In your case, since you have set a custom function it returns false which is hiding the announcement.
So you can either set “display” as schedule and set a older date and remove visitor condition (or) continue to use custom function as you do now.
Aakash ChakravarthyKeymasterHi Jeff,
Good to know it works.
You can remove [3][e].
That is not necessary.Thanks,
AakashJune 11, 2021 at 11:14 pm in reply to: Can the state of the widget change when a logged in user opens the widget #9593Aakash ChakravarthyKeymasterHi Usman,
Happy that you got a solution !
Thanks,
AakashAakash ChakravarthyKeymasterHi Jeff,
With “Visitor conditions” -> Custom function you can write your own logic to say on which condition the announcement should be shown. In your case you are always returning true. So the announcement will be shown always (after closing the alert box)
Ideally it is for users to write some complex logic to decide if the announcement has to be shown when the page is loaded like checking cookies more than what is provided etc
In your case I think you wanted to show the announcement upon clicking the page right ?
You can try below code.
1. Remove the custom function you have configured
2. Go to display -> display announcement -> schedule
3. For Schedule duration –> selecte a older duration like 2 months before (this is to keep the announcement hidden)Now paste this code.
function downloadclicked(){ var my_annoucement = document.getElementById('ancr-37').announcer; my_announcement.show(); // or .hide(); } document.addEventListener("click", downloadclicked);
Here, when the page is clicked, then announcement will be shown (via
.show()
). Every announcer bar has a property called.announcer
. In above example, we are getting that and then calling.show()
of that.Change
37
to the ID of the announcer.If you want to target *any* announcement. Then you can select the announcer element by class name. Then you need to do something like in this page and do the same like above inside a for loop.
Thanks,
AakashJune 7, 2021 at 10:19 pm in reply to: Can the state of the widget change when a logged in user opens the widget #9570Aakash ChakravarthyKeymasterHi Usman,
Please go to plugin editor, select ultimate floating widget, select includes -> display.php
At line no 120, paste the following code.
if( in_array( $id, array( '3', '4' ) ) ){ $title = is_user_logged_in() ? 'My title when user is logged in' : 'Not logged in'; }
Here ‘3’, ‘4’ are the ID of the widget box for which you need to change. Replace that with your ID, add or remove IDs as needed like in the example.
Replace the title also as needed. First one is title when user is logged in. Second is when not logged in.
When the plugin upgrades, this changes will go.
I’ll provide a WordPress hook in the next version so that you don’t need to change it directly in the code. For now please use this.Thanks
June 7, 2021 at 4:08 pm in reply to: Can the state of the widget change when a logged in user opens the widget #9566Aakash ChakravarthyKeymasterHi Usman,
I saw your website. Can yoh please confirm if you want to change “You need to login for Inquiry Cart” ?
If yes, then I can share code to change this after login.
Thanks
June 7, 2021 at 2:44 pm in reply to: Can the state of the widget change when a logged in user opens the widget #9564Aakash ChakravarthyKeymasterHi Usman,
Sorry for the delay. I missed to reply for your query.
UFW provides an “box” where you can place “regular widgets”
So widgets are common. It does not matter whether it is in sidebar or UFW.
Below are my suggestions:
1) Find if there are any plugin which allows to change widget title as you need
2) Find/write custom code to change the title of your widget. Follow this link for an idea – https://wordpress.stackexchange.com/a/290010/3914 Here they are changin the title of recent posts widget.
3) Raise a topic in above forum and get some help on how to change the title for whatever widget on any criteria as you need.If you are trying to change the title of the “widget box” itself then that comes under UFW.
But right now there is no option to change the “widget box” title dynamically. I can share some code if needed which you need to edit.Thanks,
AakashAakash ChakravarthyKeymasterMarking this as resolved.
Aakash ChakravarthyKeymasterMarking this as resolved.
Aakash ChakravarthyKeymasterMarking this as resolved.
June 4, 2021 at 11:39 pm in reply to: Use a shortcode in a template or reusable code and share #9541Aakash ChakravarthyKeymasterCheers !
Aakash ChakravarthyKeymasterHi Mathemetica,
I think a plugin called “shortcoder” is there just to solve issue like this, where users can create a shortcode for HTML/CSS/JS/Shortcode snippets.
It is one of my other plugin.
You can create a shortcode, with above sharing shortcode itself as a content and then use the “shortcoder” created shortcode to use in posts and pages.Thanks,
AakashAakash ChakravarthyKeymasterHi,
I was able to find the issue.It was an issue with Announcer, when the “admin bar” at the top was displayed.
I’ve fixed the issue on your website.I’ll soon publish the fix in the next release.For now I think everything should be fine on your end.
Thanks,
AakashJune 3, 2021 at 12:46 am in reply to: Use a shortcode in a template or reusable code and share #9532Aakash ChakravarthyKeymasterHi @Mathematica,
I saw the links you have shared.
It seems there is no other way other than the templates “not executing” the shortcode.
This is common to all shortcodes or other sharing plugin which provides shortcodes.
Since the shortcode is executed in the context of the template, the URL is incorrect.Can you please check with yout theme developer if their “resuables” can stop executing the shortcode in the template ? but execute it only when used in a post ?
-
AuthorPosts