Thread Starter
comodo
(@comodo)
<a>" title="<?php the_title(); ?>">
<div class="small-12 medium-4 columns top-banner top-banner-<?php echo $contador ?>">
<?php the_post_thumbnail(); ?>
<h3><?php the_title(); ?></h3>
</div>
</a>
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
-
This reply was modified 8 years, 11 months ago by
t-p.
-
This reply was modified 8 years, 11 months ago by
t-p.
Thread Starter
comodo
(@comodo)
Hi again, i think that is not what i need.
I get this link
/mydomain/<p>the_path</p>
“the_path” is getting from content of post.
I need to remove the p tag when i call “the_content()” from the template code.
Thank you again.
If you want a link to a post, use get_the_permalink(). At this point, I’m not clear what you want to do. You wrote “The function βthe_content()β always bring the text inside a p tag and it build the url with p tag too.”
What are you trying to do with the content of a post?
Thread Starter
comodo
(@comodo)
Hi again, sorry for the delay in answering.
What i would to get is the next thing:
I want to build a custom front-page. This page will have 3 featured blocks or banner linked to a different pages. I am using 3 post for building these blocks. Feature image of post for image of the banner, title of post for text title of banner, and i would like to use the description field of post to insert the destiny page.
When i am coding i need to insert inside the href the value of description field of the post using the_content() function, but it allways bring me the content inside p tag. I would like to get the value of description field without p tag in this case.
/mydomain/<p>destiny-page</p>
The value destiny-page is inserted inside description field of the post.
I hope you undertand what i want, thank you very much
What is “the description field”?
Thread Starter
comodo
(@comodo)
The content field of a post. Where you write the main content of a post.
OK, then let’s refer to it as “the post’s content” instead of making up new terms. π
You do NOT want to put the content of a post inside an href. You want to show the content and make a “read more” link or perhaps link the featured image to the post.