Tell us what you are trying to do?
I've created 2 custom fields with some title and descriptions that should display extra information at the bottom of each article. This extra information should appear at the bottom of each article. Those custom fields are created and use View loop. I display them on the frontend using the following code in single.php (childtheme). single.php is also attached for your own reference (oh it's not possible only image attachment are possible).
this is the code in single.php childtheme to display the fields on frontend
<?php
/**
* Adding company box custom fields
*/
?>
<div class="company-information">
<?php
if(get_post_meta(get_the_ID(),'wpcf-first-company-description-1', true))
{
echo '<div class="about-company1-info-box">';
echo '<h4>' .get_post_meta(get_the_ID(), 'wpcf-first-company-name', true). '</h4>';
echo get_post_meta(get_the_ID(), 'wpcf-first-company-description-1', true) ;
echo '</div>';
}
?>
<?php
if(get_post_meta(get_the_ID(),'wpcf-second-company-description', true))
{
echo '<div class="about-company2-info-box">';
echo '<h4>' .get_post_meta(get_the_ID(), 'wpcf-second-company-name', true). '</h4>';
echo get_post_meta(get_the_ID(), 'wpcf-second-company-description', true);
echo '</div>';
}
?>
</div>
<?php } ?>
</div>
Is there any documentation that you are following?
Is there a similar example that we can see?
In this example the content of the article is displaying correctly because I had to go to each old post and resave it to make the content appear again.
hidden link
The problem
When I disable the View and Type plugins, the content from old posts appear again. When I activate the plugins again, then the old posts content don't show the content area with text. This is a link to an old post where it has text and content but it's not displaying the content between the two adverts. (Now the plugins are activated)
hidden link
Every time I deactivate and reactivate the plugins, the content area of all the post disappears and have to update(re-save) them one by one. I have some 500+ articles
I hope you can help me with this because it's been a real headache for so many weeks
Looking forward to your reply