-
AuthorPosts
-
April 22, 2014 at 5:43 pm #36103
Hello, I just recently purchased your theme and so far so good.
I will be uploading reading material for my users and I want to create a PDF gallery/portfolio where the users will see a thumbnail of the document and are able to click on it. My question is what would be the best way to achieve this?
Should I set a custom link directly to the PDF file on the feature image as per http://wordpress.org/support/topic/set-a-custom-link-for-featured-images and let the browser handle the PDF
Or Install a document viewer plug in such as http://wordpress.org/plugins/simple-google-docs-viewer/ and load the document inside the page that opens. If so, then remove the feature image from inside the post as per the many instruction on this forum
Or another more efficient method? I’d like to keep the number of files I upload to minimum and to make it a smooth experience for the user.
Thank you!
April 23, 2014 at 11:59 am #36329Hi Pavel,
Either option would depend on the experience you want to provide to your user. Once you decide which user experience you want (embedded, or direct link) you can try implementing it.
Another option would be to add a download button on the portfolio item page: http://theme.co/x/demo/integrity/1/shortcodes/buttons/
You could give the button a link to your PDF file.
If you want to simply send the user directly to the file after clicking an item, there’s a modification discussed on this page that might help you : http://theme.co/x/member/forums/topic/directing-an-item-in-portfolio-to-a-page/
April 29, 2014 at 5:55 pm #38677Thanks for the tips. I tried the second solution.
add_filter( 'post_type_link', 'x_remap_portfolio_to_page', 10, 4); function x_remap_portfolio_to_page($post_link, $post, $leavename, $sample) { if ('x-portfolio' == $post->post_type) { $custom = get_post_custom($post->id); if (isset($custom['x_custom_link']) && $custom['x_custom_link'][0]!='') return $custom['x_custom_link'][0]; } return $post_link; }
Is there a way to open the link in a new tab/page instead?
April 30, 2014 at 4:12 pm #39035Hi Pavel,
To open in a new tab, it would be better to just add this via Javascript instead of altering the template code. You can place this under Customizer > Custom > Javascript
jQuery(function($){ $('.x-portfolio .entry-title-portfolio a').attr('target','_blank'); });
May 2, 2014 at 1:09 pm #39831This worked in the portfolio view; however, it doesn’t work for the featured post section of the home page. Additionally I made a modification to allow a new tab when the featured image is clicked.
jQuery(function($){ $(‘.x-portfolio .entry-title-portfolio a’).attr(‘target’,’_blank’); });
jQuery(function($){ $(‘.x-portfolio .entry-featured a’).attr(‘target’,’_blank’); });Is there a better way of combining the two to accomplish the action I desire, or is it okay to have two separate scripts?
May 2, 2014 at 8:47 pm #40015Hi Pavel,
Glad it worked!
Yes, you could combine them and much cleaner.
jQuery(function($){ $('.x-portfolio .entry-title-portfolio a, .x-portfolio .entry-featured a').attr(‘target’,’_blank’); });
Thank you!
January 29, 2015 at 11:26 pm #194908Hi, I would like to add a pdf to my homepage, but I don’t want it open in a new tab or window or direct the user to another page. I’m interested in putting a thumbnail of the pdf which, when clicked, opens up a lightbox displaying the multi-page pdf.
I’ve read that lightbox doesn’t support pdfs, so I tried a roundabout way of doing so by uploading each page of the pdf as png files in hopes of creating a gallery with lightbox, however, I realized that it won’t work since I need to insert every image on the page to make a lightbox gallery and I only want to show my visitors the thumbnail.
I’m using Renew 3 (#2), and I’m interested in placing a small sample of my portfolio in the services section of the page as displayed in the demo (local, digital, relational, etc). Your help is much appreciated. Thanks!
January 30, 2015 at 5:27 pm #195647Hi there,
Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.
November 6, 2015 at 10:17 pm #655892This reply has been marked as private.November 7, 2015 at 12:31 am #655947Hello @moodymedialabagency,
Thanks for updating this thread! At this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.
Thanks!
-
AuthorPosts