Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
websitestory
MemberIf anyone else is interested to do the same, the code Erik pointed me to worked great. My only change was no date format which then uses the date format in WordPress and I wrapped the date up in a span with a class so I can style it separately. Here it is:
//* Add date before title add_filter( 'the_title', 'add_date_to_title', 10, 2 ); function add_date_to_title( $title, $id ) { // if not a wp-admin page if ( !is_admin() ) { // if it's inside the main loop if ( in_the_loop() && is_main_query() ) { // add date to title $title = '<span class="date">' . get_the_date() . '</span>' . ' ' . $title; } } return $title; }websitestory
MemberAwesome thanks Erik! I will test it out and let you know how I go. It seems relatively straightforward.
Cheers.
websitestory
MemberHey Erik,
Thanks for the reply. Almost like that but I'd like them on the same line e.g.
9th June 2015 - This is the post title
Hope that makes sense
Cheers
websitestory
MemberReally impressive for a first attempt. I think it flows really nicely and I do love the pop of yellow throughout the site. It looks great on a mobile device as well. You must be really please with the result.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)