-
AuthorPosts
-
June 5, 2014 at 2:32 pm #275138
Hallo zusammen,
vielen Dank für dieses tolle Theme. Ich habe in einigen Einträgen gelesen, dass auch deutsch ok ist, dass nutze ich gleich mal aus.
Wenn ich Bilder in einem Beitrag einfüge und mit einem Klick auf das Bild sich die Lightbox öffnet, dann wird mir über dem Bild die Bildbeschriftung (die ich in der Mediathek eingetragen habe) angezeigt. Ich möchte aber nun, dass sich unter dem Bild das was ich als “Beschreibung” eingetragen habe angezeigt wird.
Mir geht es darum möglichst gut Quellen für nicht von mir erstellten Bildern anzuzueigen oder gibt es da eine bessere Vorgehensweise? Ich hoffe ihr könnt mir helfen und habt mein Problem verstanden.
June 6, 2014 at 5:24 am #275447Hey kultblendecom!
First of all, thank you for using the theme!
If you don’t mind, we would like to see an actual page with the image. If I am not mistaken, you want to remove the description below the lightbox image? I’m sorry if that is not the case because I’m only using google translate to read your language. If you want to remove the description, just add this on Quick CSS or custom.css:
p.pp_description { display: none !important; }
Regards,
IsmaelJune 6, 2014 at 7:51 am #275478Hi Ismael,
no, i want the description to be showed directly under the picture if i open it in a lightbox. The case is conversly :-)
Here is a page where you can see it.
http://kultblende.com/richtige-kamera-finden/So, pls click on the header image. In “Mediathek” (dunno if its the right term for the page in english) at the backend it put a caption to this image called “Old Camera”. This caption is showed right over the picture. I also added a picture description called “This is a test.” and i want this description to be showed directly under the picture.
- This reply was modified 10 years, 6 months ago by kultblendecom.
June 6, 2014 at 12:51 pm #275547Hey!
Normally the post title will be used as image caption (like here: http://test.inoplugs.com/this-is-a-nice-post-2/ ) and the image alt attribute content will be used for the lightbox title. I’m not sure why the post title is not used for the image description on your website tough. Maybe a custom child theme template overwrites the default loop-index.php template?
If you want to use the image description for the lightbox description open up wp-content/themes/enfold/includes/loop-index.php and replace:
if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>';
with
$image_description = get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true); if(empty($image_description)) $attachment = get_post(get_post_thumbnail_id()); if(empty($image_description) && is_object($attachment)) { $image_description = $attachment->post_excerpt == "" ? $attachment->post_content : $attachment->post_excerpt; $image_description = trim(strip_tags($image_description)); } if(!empty($image_description)) $featured_img_desc = $image_description; if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>';
Cheers!
PeterJune 6, 2014 at 1:56 pm #275572Hi Peter,
it works little better now. I have made a picture of how the situation is now and what i want to have. Can you please tell me what i can do?
- This reply was modified 10 years, 6 months ago by kultblendecom.
June 7, 2014 at 9:11 am #276024Hi!
Thank you the screenshot.
Is it ok if you use the alternative text field in place of the caption? What will happen is, you have to place the caption on the Alternative Text field. Edit loop-index.php then replace Dude’s changes with this:
$attachments = get_post(get_post_thumbnail_id()); $caption = $attachments->post_excerpt; $description = $attachments->post_content; $featured_img_desc = $description; if($slider) $slider = '<a data-type="'.$caption.'" class="post-attachment-caption" href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>';
Cheers!
IsmaelJuly 9, 2014 at 8:16 pm #289185Hey guys,
I really need your help again. I really become desperate with this. Let me explain my problem.
I do the following (see in picture):
The picture source (what I have written in the picture description) is shown in the frontend like this:
Everything fine till now.
BUT. If I use the same picture as the header picture it looks in Frontend like this:
I dont know why the hyperlinks are shown above the headerpicture. The lightbox doesn´t work as well. If I delete the links from the description the lightwork starts to work in the frontend for the header picture again.
I hope you can help me. It is very important for me.
July 9, 2014 at 8:31 pm #289190Let me add this: It seems that this problem comes just with google chrome.
In IE, Firefox and Chrome @ Android Device, the problem isn´t there….
July 10, 2014 at 5:03 pm #289599Hey!
Can you post a link to the page please – I’ll check the css code.
Cheers!
PeterJuly 11, 2014 at 9:40 pm #290268I have another solution, i put the image sources manually in my articles. thank you.
July 12, 2014 at 2:37 pm #290460Hi!
Great, glad you found a solution.
Regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.