[Resolved] Layout View for attachment dont`t show image

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create a Layout for Media attachment pages, but I can't get my image to show up.

Solution: Add the following attachment link shortcode:

add_shortcode('wpv-attachment-link', 'attachment_link_shortcode');
function attachment_link_shortcode ($atts) {
  global $post;
  return wp_get_attachment_image_src($post->ID, $atts['size'])[0];
}

Use the shortcode like so:

[wpv-attachment-image size="large"]

Now each image is displayed as a link to the attachment.

This topic contains 7 replies, has 2 voices, and was last updated by  Ronny Wunderlich 1 week ago. The support staff assigned to this topic is Christian Cox.

Viewing 8 posts - 1 through 8 (of 8 total)
Author
Posts
#569552

I am trying to: I like to show an attachment view with image, beacause when i search in Google i find my attachment site, but she is only white.

Link to a page where the issue can be seen: http://ronnywunderlich.de/blick-vom-panoramapunkt-auf-berlin-fotospot/gitterblick/

Instead, I got: I cant see the Image. I insert it with the [wpv-post-featured-image size="full"] shortcode. But it doesnt work.

#569567

Christian Cox
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/New_York (GMT-04:00)

Hi, can you post a screenshot that shows where you have added this shortcode in wp-admin? I would like to get a bit more information about how you have implemented it. Please show the entire page in wp-admin where the shortcode is included. Then, please show a screenshot of the featured image in this post in wp-admin:
http://ronnywunderlich.de/blick-vom-panoramapunkt-auf-berlin-fotospot/

#569604

Hi, i make a Layout, put the shoortcut in this Layout and use it for media attachements. Here is e screenshoot.

#569608

Christian Cox
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/New_York (GMT-04:00)

Try adding a post content cell to your Layout.

#569689

I try, but not work.

#569705

Christian Cox
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/New_York (GMT-04:00)

That should work, can I take a look in your wp-admin area to see what's going wrong? Please share login credentials in the private reply fields here.

#569821

Christian Cox
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/New_York (GMT-04:00)

Okay thanks, it seems to be set up correctly so I'm not sure what's going on. Can you try the following troubleshooting steps?
- Temporarily disable all non-Toolset plugins and activate a default theme like Twenty Seventeen
- If the problem is resolved, reactivate your theme and plugins one by one until the conflict is revealed
- If the problem is not resolved, I may need to create a clone of your site so I can run some more tests without changing your site's live content. I will use the Duplicator plugin to create this clone. Let me know if that's okay.

#569912

Hi, i test with other template and it works.

Now i use a code from https://wp-types.com/forums/topic/media-overview-shows-image-twice/page/2/#post-560140

Now it works for me.

Thx

Viewing 8 posts - 1 through 8 (of 8 total)

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

Known issues and their solutions

We document known issues and their solutions in Toolset erratas. Save time by checking there first and seeing if what you are facing is a known issue. This list is kept short. We do our best to resolve all known issues with every release of Toolset plugins.

Support Policy

Toolset staff will help you use the Toolset plugins correctly, provide any information you need, help troubleshoot problems and advice on best-practices.

Please make sure to issue only one topic per each support ticket.

For more information, read our full Customer Support Policy.

Need custom programming work for your site? Check out our certified partners.