WordPress.org

Ready to get started?Download WordPress

Forums

how to execute an action when end-user clicks on post (7 posts)

  1. lumax89
    Member
    Posted 2 years ago #

    Hello, I tried searching my question over the internet and couldn't find it, perhaps Im searching with the wrong words by I tried.

    Im a photographer and showing my portfolio in a stylish fashion way is very important. When I first bought my template I kind of chose it cause on the front page when you clicked on a post it automatically showed a lightbox with a nice slideshow of pictures. But then realized that the pictures displayed there can only be the ones that are in that page and not the ones I choose, which is of no use.

    So basically what I want to do is that I bought a nice gallery plugin with a lightbox and want to display it immediately when the user clicks on the picture (featured image) of the post. I DONT WANT the client to enter the post, cause theres no point with it.
    http://www.maximilianotaylor.com/wordpress (my webpage)

    So to sum up, I want to link directly when the user hits the button of the post, to the lightbox gallery inside the post, skipping viewing the actual post.

    I know its kind of weird but this is critical for me, if anyone could help that would be great!

  2. deepbevel
    Member
    Posted 2 years ago #

    One way would be to add the image link to the post title. this may be an awkward way, but you could use a plugin which allows you to add html(and so an image link) to a post "heading" which could sub for the_title.

  3. lumax89
    Member
    Posted 2 years ago #

    and what plugin would that be?

  4. deepbevel
    Member
    Posted 2 years ago #

  5. lumax89
    Member
    Posted 2 years ago #

    yep, my fault, not the right answer cause it wasn't the right question.

    I have installed the portfolio plugin, which is shown at the homepage of my website. With the default lightbox (added throw the ¨lighbox-url¨code in the custom fields of the portfolio post) that came with this template, when you clicked on either one of the posts it directly shadowed the homepage and displayed the lighbox slideshow, without showing you the actual post (cause thats what you want it to do, just show the pictures).

    But learning how that lighbox-url code work it doesn't allow me to choose the pictures displayed, therefore I needed a different solution.
    I installed a nice gallery lighbox that works great but you can only access it once you enter the post. This is the step I want to skip.

    I know there has to be a way to directly link when you click on the either one of the portfolio post displayed on the homepage of my website directly with the lighbox of the images inside it, skipping actually viewing the portfolio post.

    I know its a tricky question and I have actually asked several of my programers friends and they've all declined telling me its to complicated :(
    Anything can be done?

  6. deepbevel
    Member
    Posted 2 years ago #

    You're right, must be a way to wrap the_title in a custom link to a selected image file, and add a lightbox class, but thus far I don't know how.

  7. deepbevel
    Member
    Posted 2 years ago #

    I know there has to be a way to directly link when you click on the either one of the portfolio post displayed on the homepage of my website directly with the lighbox of the images inside it, skipping actually viewing the portfolio post.

    after re-reading your responce, I'm puzzled. If you use a heading for the post, instead of the title, will the heading not show up with the post? if it does, you can add a custom link to the heading, make it link to your image and add a lightbox class. Maybe I still don't follow what you're trying to do. ?

Topic Closed

This topic has been closed to new replies.

About this Topic