Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2019-06-12 10:03:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,271
Website

Re: article image field as facebook meta property

Hi Gallex,

re description, you can use:

<txp:if_description>
<meta property="og:description" content="<txp:meta_description format="" />" />
<txp:else />
<meta property="og:description" content="<txp:excerpt />" />
</txp:if_description>

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#12 2019-06-12 13:00:46

Gallex
Member
Registered: 2006-10-08
Posts: 1,129

Re: article image field as facebook meta property

Gallex wrote #318457:

<txp:if_individual_article> <meta property="og:description" content='<txp:rah_metas description_from="body" description_replacement="1" />' /> </txp:if_individual_article>

just show you, how facebook displays the code above:

<meta name="description" content="this is description text from article body..." />

Offline

#13 2019-06-12 13:03:19

Gallex
Member
Registered: 2006-10-08
Posts: 1,129

Re: article image field as facebook meta property

colak wrote #318458:

Hi Gallex,

re description, you can use:

<txp:if_description>...

but if there is now excerpt?

Offline

#14 2019-06-12 15:16:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,271
Website

Re: article image field as facebook meta property

Gallex wrote #318461:

just show you, how facebook displays the code above:

<meta name="description" content="this is description text from article body..." />...

I’m sure it works. It is just that the code above requires no plugins


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB