[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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 2 months 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: hidden link

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-05: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:
hidden link

#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-05: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-05: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-05: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)