Forum
Facebook OG in portfolio detail page
Hi!
I recently posted an issue (https://forum.grabaperch.com/forum/06-14-2017-meta-data-in-portfolio-detail-page) about trying to get the Facebook Open Graph into the portfolio detail pages. I thought it was sorted but going into the source code it shows all of the available facebook tags for every portfolio item (see below)
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>John Mark Films - Luxurious, creative, inspiring wedding videos</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Font -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/elegant-font.css">
<link rel="stylesheet" href="css/linearicons.css">
<!-- REVOLUTION STYLE SHEETS -->
<link rel="stylesheet" type="text/css" href="revolution/css/settings.css">
<!-- REVOLUTION LAYERS STYLES -->
<link rel="stylesheet" type="text/css" href="revolution/css/layers.css">
<!-- REVOLUTION NAVIGATION STYLES -->
<link rel="stylesheet" type="text/css" href="revolution/css/navigation.css">
<!-- OWL CAROUSEL
================================================== -->
<link rel="stylesheet" href="css/owl.carousel.css">
<!-- SCROLL BAR MOBILE MENU
================================================== -->
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/223138475" />
<meta property="og:title" content="Sophie & Spencer" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/223138475" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/220651962" />
<meta property="og:title" content="Oldwalls, Gower" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/220651962" />
<meta property="og:type" content="video" />
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/220012907" />
<meta property="og:title" content="Hannah & Owen" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/220012907" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/217809612" />
<meta property="og:title" content="" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/" />
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/214009710" />
<meta property="og:title" content="Alex & Alun" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/214009710" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/211637553" />
<meta property="og:title" content="" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/" />
<meta property="og:site_name" content="" />
<meta property="og:url" content="https://player.vimeo.com/video/196611146" />
<meta property="og:title" content="" />
<meta property="og:description" content="" />
<meta property="og:video" content="https://player.vimeo.com/video/" />
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.css" />
<!-- Main Style -->
<link rel="stylesheet" href="style.css">
<!-- color scheme -->
<link rel="stylesheet" href="switcher/demo.css" type="text/css">
<link rel="stylesheet" href="switcher/colors/yellow.css" type="text/css" id="colors">
<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="favicon.png">
</head>
Below is my code, what am I doing wrong? I'm practically there but can't get just the one set of tags.
Thank you!
<?php
include('admin/runtime.php');?>
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>John Mark Films - Luxurious, creative, inspiring wedding videos</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Font -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/elegant-font.css">
<link rel="stylesheet" href="css/linearicons.css">
<!-- REVOLUTION STYLE SHEETS -->
<link rel="stylesheet" type="text/css" href="revolution/css/settings.css">
<!-- REVOLUTION LAYERS STYLES -->
<link rel="stylesheet" type="text/css" href="revolution/css/layers.css">
<!-- REVOLUTION NAVIGATION STYLES -->
<link rel="stylesheet" type="text/css" href="revolution/css/navigation.css">
<!-- OWL CAROUSEL
================================================== -->
<link rel="stylesheet" href="css/owl.carousel.css">
<!-- SCROLL BAR MOBILE MENU
================================================== -->
<?php
perch_content_custom('Weddings', array(
'template' => 'facebook-seo.html',
));
?>
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.css" />
<!-- Main Style -->
<link rel="stylesheet" href="style.css">
<!-- color scheme -->
<link rel="stylesheet" href="switcher/demo.css" type="text/css">
<link rel="stylesheet" href="switcher/colors/yellow.css" type="text/css" id="colors">
<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="favicon.png">
</head>
<body>
<?php include('includes/analyticstracking.php'); ?>
<?php include('includes/navigation.php');?>
<?php perch_content_custom('Weddings', array(
'page'=>'/films.php',
'template'=> 'wedding_detail.html',
'filter' => 'slug',
'match' => 'eq',
'value' => perch_get('s'),
'count' => 1,
));
?>
Hi Jade,
You just need to filter it as you've done for the listing at the bottom. Eg:
Great thank you, Simon!