Link title to the Gallery
URL to the page in question:
http://
-
Hi,
would it be possible to link the titles of the home blocks to the gallery of the home block?
Thanks in advance!
Best regards,
Sanna
Sanna,
Thank you for your business first of all. Great question too. You can do that. Here’s how:
- Go to the Media section in your WordPress dashboard and find the image that’s the featured image of your block.
- Click the edit link. Look on the right hand side of the screen that pops open for the File URL. Copy that (we’ll need it in a minute).
- Then edit the home block you’re working with. Scroll down to the content box where you have your title and other text.
- Click on the “text” tab that’s on the top right above the content box. We’ll have to use the HTML editor to add the link correctly.
- Enter this for the title with a link in it:
<h2><a rel="swipe-group-id" href="http://yoursite.com/image.jpg" class="swipebox pop-open">Your Title</a></h2>
Just replace the http://yoursite.com/image.jpg with the URL to your image from earlier and the “Your Title” with the text you’d like to have as a linkable title.
- Next look up in the navigation bar of your browser. It’ll look something like this: http://themes.dev/selfie/wp-admin/post.php?post=22&action=edit
In that case the post=22 lets us know that the ID of this home block is 22. You’ll also need to replace the “id” in the snippet above with the ID of this home block.
- Update your home block.
That should let the title open up your gallery now. If you run into any trouble, let me know.
Thanks again,
Bill
This reply has been marked as private.
I was wondering about another thing as well,
would it be possible to link to a home block from another home block?
Thanks in advance!
Best regards,
Sanna
Sanna,
Shoot. I should have thought about that doubling. Instead of using the URL for the featured image, use the URL to one of the images in the gallery and then remove the image from the gallery. That should still cause the image to be visible in the gallery, but only once.
It’s also possible to link to another gallery. Just match the ID of the gallery you’d like to link to and the link will open it instead of the one in the home block where the link is. You could create a series of links that actually open all of them from one home block if you wanted to.
If you have any trouble, let me know.
Thanks,
Bill
HI Bill,
it works great now 🙂
BR,
Sanna
Fantastic 🙂 If you need anything else, let me know.
Take care,
Bill
- The topic ‘Link title to the Gallery’ is closed to new replies.