Links not being displayed in CPT
-
I’m creating a series of CPT. I used acf to create this, but they seems to behave normal. I have two CPT named capitulo and versiculo.
versiculo uses the single-versiculo.php template and I can see the posts display the links. The single-versiculo.php uses this line to display the content:
<?php echo apply_filters('the_content', get_the_content()); ?>
capitulo uses the single-capitulo.php template. It uses this line to display the content:
echo apply_filters('the_content', get_the_content());
But there are no links displayed. I can’t see the difference and I’m turning myself crazy with this.
Besides, in single-capitulo.php I also retrieve versiculos, because there are a one to many relationship among capitulos and versiculos. Because performance, I use a direct call to the database to retrieve the content from wp_posts ($versiculo->ver_contenido). Then I use this line to display the post:
$filtered_content = substr(apply_filters('the_content', $versiculo->ver_contenido), 3, -5); printf('<div class="versiculo-item " style="background-color:var(%s)"><b style="color:purple">%s</b> %s</div>', $alternateColor, $versiculo->ver_num_versiculo, $filtered_content );
Despite the use of apply_filters with the_content filter, I can’t see any link in my page.
The CPT Capitulos is also added to the whitelist. What may be wrong?The page I need help with: [log in to see the link]
- The topic ‘Links not being displayed in CPT’ is closed to new replies.