Forum

Thread tagged as: Problem

Social sharing icon page links

I have some social media sharing icons (code example below) which work perfectly for the blog app. However I'm trying to use it on pages generated by my client in a subsection of the site but can't work out how to put in the page name. I have tried replacing <perch:blog id="postTitle"/> with <perch:content id="pageTitle" /> but it doesn't work. Any ideas?

<a class="soc-twitter" href="https://twitter.com/home?status=<perch:blog id="postTitle" />+https://arebemarketing.co.uk<perch:blog id="postURL" />" target="_blank"></a>

Here's a link to the site section: https://arebemarketing.co.uk/arebetrate/twitter-vs-chatter.php

Thanks.

Richard Lalchan

Richard Lalchan 1 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you need, the page title and the page URL?

Hi Drew. Yes, just Page title & URL.

Just worked out how to get the Page Title but the URL doesn't work following the same pattern.

<?php perch_pages_title(); ?>

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can use:

<?php echo PerchSystem::get_page(); ?>

Brilliant. Works perfectly. Thanks.