Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
So you want to hide a title on a specific page?
Thread Starter
Kanger
(@kanger)
No what I have and want to do is as follows:
My static front page has a nice big header, then a posts section where it shows the latest post nice and large across, then below that are small exerpts in columns from the 3 previous posts before that. Then further down the page is the content from the actual page (front-page.php) I posted in the admin bit of wp which says ‘About’ then a few paragraphs.
I want to find out what the post title is whether it be ‘About’ or anything else and then echo that in a<a>
tag (just above that section) and also echo it in the navigation menu, so in the menu bar at top of each page I will have a link to the ‘About’ bit on the front page.
Hope that makes sense, I’m working on it locally right now, so haven’t got a link to send
any ideas much appreciated
thanks in advance
Thread Starter
Kanger
(@kanger)
oops didn’t mean to make that all a link should have put
<a name= >
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You can do things like getting the post title and comparing it to see if it’s “about” for example, or maybe you’d want to get the post ID instead.
E.g.:
if (get_the_ID() == 30) {
// Do your stuff
}
http://codex.wordpress.org/Function_Reference/get_the_ID
Thread Starter
Kanger
(@kanger)
Thanks but I want to set it up as a theme people can download and use without having to do any techy stuff.
That’s why I was hoping to get it from it being static front page
Don’t know if that’s possible? 😉