Forum Replies Created
-
AuthorPosts
-
Thanks! I am using your theme for quite some years and a lot of cusomters by now. Had the need for this option many times, found some workarounds but a real solution would be way better. Keep looking forward to spot it in the changelog someday in the future.
You may close this for now. Kind regards, Daniel
October 13, 2021 at 9:21 am in reply to: Show Copyright for images in Standard Editor Blog Posts #1324695Does anyone know whether it is possible to collect a list of all picture credits specified in the media library on one page via a shortcode or something similar? Maybe this could be an other way to solve my problem …
Thank you! I could have come up with that myself. Thanks for the links. But maybe it would also be an idea to incorporate such a solution in the future. With startdate you would only have to be able to specify a period instead of a specific date. Can I make a feature request for this somewhere?
Hi Ismael,
thanks for your fast response. Wouldn’t anything like that affect the whole blog? I would like to set it only on one page for a certain Blog Post Element. Is this possible with the given example?
All the best,
DanielAugust 9, 2021 at 3:42 pm in reply to: Sort Blog Post Element by "ACF" Advanced Custom Field #1315872Hi Ismael,
thanks for the fast response and sorry for the late reply. So where exactly would I have to place the code? My field in ACF is called “last-name”, where would I have to call it? Inside the code above? This is in my functions.php at the moment.
Big thanks for any advice!
Cheers, DanielDear Ismael,
thanks for pointing me in the right direction. In the mentioned file I realized that the fonts get extracted in a folder called ‘avia_fonts’. The zip-archive doesn’t need to remain in the library and the self hosted fonts are working nevertheless. And that is everything I wanted to have. I can delete the zip-archive and everything will still look fine. Thanks!
All the best, DanielI would love to get a ready and useable solution but I can understand why Ismael says it is beyond the scope of support. If there is no additional info you may close. Thanks for your message.
Thanks Ismael!
Hi Ismael, thanks for the quick response! What exactly do you mean by “not out of the box”? Sounds as if there is a theoretical way? Could you possibly point me in a direction?
April 13, 2021 at 9:19 am in reply to: Show Copyright for images in Standard Editor Blog Posts #1294046That is true, Guenni. Thanks for your advice. I want to use the information from the copyright field in the standard WordPress text editor also, not only in avia layout architect. Therefore I need to load the copyright information from the field inserted by Enfold into a standard editor blog post. Basically that is working with Nikkos code (thanks!) but it is not dynamic (see post #1289982 above). Any ideas?
All the best, Daniel
March 27, 2021 at 8:57 pm in reply to: Show Copyright for images in Standard Editor Blog Posts #1290779For sure, Guenni, nor problem: https://bavotasan.com/2012/add-a-copyright-field-to-the-media-uploader-in-wordpress/. What do you think? Any suggestions?
March 25, 2021 at 7:06 pm in reply to: Show Copyright for images in Standard Editor Blog Posts #1290445Hi Nikko,
Thanks for your reply. I found some links online that seemed to offer a solution for this problem. Isn’t the link in private about basically the same thing I want to achieve?
Best regards,
DanielMarch 24, 2021 at 10:24 am in reply to: Show Copyright for images in Standard Editor Blog Posts #1290056Hi Nikko,
I will try to find a good solution. But since the copyright is implemented through Enfold I would have to know which selector I have to use to call the copyright field content from an image with added copyright information.
In your code I found:
_avia_attachment_copyright
Is this where the copyright information is saved?
Could I use something like that:
function get_image_copyright( $attachment_id = null ) { $attachment_id = attachment_url_to_postid( $image_url ); if ( $attachment_id ) return get_post_meta( $attachment_id, '_avia_attachment_copyright', true ); }
Does that trigger the wanted information? If yes I only need a hint where to place a function to show it for every image in the blog.
Something like:
echo get_image_copyright();
What do you think?
All the best,
DanielMarch 23, 2021 at 7:45 pm in reply to: Show Copyright for images in Standard Editor Blog Posts #1289982Hey Nikko,
thanks for the code. I made some adjustments and it kind of works, but it’s not really convenient. I invested several hours to automatically place the copyright line with the image in the text, depending on the alignment of the image in the text flow.
add_filter('get_image_tag', function($html, $id, $alt, $title, $align, $size) { $copyright_text = get_post_meta( $id, '_avia_attachment_copyright', true ); if ($copyright_text) { $image = $html; $html = '<figure class="copyright-image-wrapper">' . $image; $html .= '<p class="my-copyright">' . $copyright_text . '</p>'; $html .= '</figure>'; } return $html; }, 10, 6); function copyright_textfluss(){ ?> <script> jQuery(document).ready(function($) { $('.copyright-image-wrapper:has(.alignleft)').addClass('alignleft'); $('.copyright-image-wrapper:has(.aligncenter)').addClass('aligncenter'); $('.copyright-image-wrapper:has(.alignright)').addClass('alignright'); }); </script> <?php } add_action('wp_head', 'copyright_textfluss');
But there are still two problems:
• All the html-markup stays in the blog entry if a picture is deleted. This is annoying and therefore not a really nice solution …
• The copyright-information is simply copied into the text, there is no connection to the database. If there are changes to the copyright-information in the media library it won’t reflect in the blog.In the theme image-element it adds a snippet to the shortcode like [copyright=’icon-reveal’]. Couldn’t something like that also be implemented for the standard editor?
Hope you have a good idea!
March 22, 2021 at 9:57 am in reply to: Show Copyright for images in Standard Editor Blog Posts #1289578Dear Nikko,
Thank you for your answer. Since the data is saved in the database, it should also be able use it in the standard editor. There are even instructions on the Internet for this, but they refer to a selfmade copyright field (see link) but the field is already given by your theme.
In the meantime I found a post from Ismael, unfortunately I don’t quite understand the explanation since it offers possibilities and not one single solution. It seems to be about exactly the issue that I am facing: https://kriesi.at/support/topic/copyright-images-2/#post-1228898
Therefore I believe there is an option for this and would be happy to receive a brief explanation or instructions. Thank you!
March 18, 2021 at 9:36 am in reply to: Show Copyright for images in Standard Editor Blog Posts #1288902Hey Nikko,
basically i have the problem on several sites, all of which I run with your great theme.In the Advanced Editor I can set when and how the copyright should be displayed. In the blog I use the standard editor and insert the images via “insert media”. At this point I have no choice regarding the display of the copyright information.
Enclosed you will find a link to an exemplary page. For the header image I found a short css code in the forums and the copyright shows beneath the picture. The picture is used again at the end of the article. Inserted via the standard editor. There we had to manually add the copyright in the caption, as there is no way to show it automatically …
As I said, my aim is to show the copyright information for all images that are used in the blog via the standard editor, provided that the copyright information has been saved in the media library with the image.
I found some snippets for functions.php on the web and the forums but none is working in the expected way.
Hoping for a solution!
Cheers, Daniel
Added some CSS. Works for me.
You can close this thread.
Thanks again!Perfect! Tested and tweaked it a little bit and it just works. Thank you.
Any chance to hide the badge while the banner is opened?
Hey Rikard,
normally the banner is always shown on first pageload. If you then make a selection whether cookies are allowed or not, the banner disappears. After that you can see the badge on the side and use it to display the banner again. I would like to only see the badge right from the start and display the banner using the badge as a toggle. The banner should not appear when the page is loaded until the visitor decides what to do, it should only be displayed via the badge. There is a css class added after the cookie decision. Perhaps, for example, you could add this beforehand so that you don’t just see the banner, as I said, but only show it via the badge.
Can you understand it better like that? Thanks for your help!
All the best,
DanielHey Ismael,
thank you for your fast answer. I removed the line and it does the trick!
Happy customer with more than 30 installations of your theme and now my first support question with correct answer in no time at all – thank you!Hey dear Enfold-Support-Team-Members, I used the code Isamel provided (2017-09-30) in serveral installations. Worked like charm! Right now there seems to be a problem. In latest WP and latest Enfold the
function avia_disable_alb_drag_drop_mod
is not working anymore. If the complete code is added the advanced builder is active for all user roles, not only for'editor', 'administrator', 'author'
. Could you take a look into the part of the function that is checking the roles? I would need a helping hand to sort it out. At some of my pages it is now possible to access the advanced layout builder for roles that should not be able to drag and drop. Thank you! (answers in English or German please – thanks) -
AuthorPosts