Adding meta tag in header.php not coming through

Posted in: Newspaper
Post count: 48

Hello,

I have modified the header.php file by adding 1 line:
<meta name=”artikelid” content=”<?php $ID = $wp_query->post->ID; ?>”>

However it is not coming through on the front end, caching is emptied, have no clue why.

Does this have something to do with the fact that you choose a header template in Newspaper and that once chose if you change something to the header.php file that it doesn’t take this into account anymore?

Thanks for looking into this.

Post count: 35449

Please check the answer from this similar topic about the header file and where it is set -> https://forum.tagdiv.com/topic/custom-code-between-head-tags-not-added-through-header-php/
Thank you!

Post count: 48

Hello Calin,

I can’t use the analytics/js option because I need to output the post id by using php in that meta tag. (that analytics field will not allow php normally)

So I need to edit a php header file. We are using a new version of newspaper where tagdiv composer is active.
But we don’t use the tagdiv standard pack.

We are using a cloud template default pro which is the newest way of working.

wp-content/plugins/td-composer/legacy/Newspaper/header.php

However that url says legacy so I am confused because we use all the new tagdiv stuff. On which path should I alter the header.php?

Thanks

Post count: 35449

Hi,

Yes, if you are using cloud template, the file where you need to set the code in this one wp-content/plugins/td-composer/legacy/Newspaper/header.php

Bothe plugins (tagDiv Composer and tagDiv Cloud Library) has this “format” to can be use in child theme, in this way the elements under/legacy/Newspaper/ can be edited in a child theme, this method was adopted for users like you how use cloud templates and standard pack is disabled, in this way they can use the file from composer in child.

Hope this will help!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.