Post without title insert permalink
-
Hi, i’m trying to pass the “Theme unit test” on a development alpha site.
This is my first experience in html, css, php and wordpress, i’m a noob.I would like to insert a title like “No title” into the post without the title and without the permalink.
This post is in the “Theme unit test” but i can’t find the way to insert the permalink on the date as the post suggest.
The post in the website is the fourth on page 4 https://filmandnovel.altervista.org/blog/page/4/
This is what the post says.
This post has no title, but it still must link to the single post view somehow.
This is typically done by placing the permalink on the post date.
And this is my code for getting the title and permalink,
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"> <?php the_title(); ?> </a></h2>
i tried many solution with if and else but nothing worked and still no title appear.
Thanks for your attention
- The topic ‘Post without title insert permalink’ is closed to new replies.