Plain post title above post image (Error)
-
Hello,
I just realised that after the last update the post title is shown in plain text above the post image on the main page. I think this is an error?!
How can i get rid of it?Here’s a screenshot.
ScreenshotThank you
-
This topic was modified 6 years, 3 months ago by
overide6.
The page I need help with: [log in to see the link]
-
This topic was modified 6 years, 3 months ago by
-
I have exactly the same problem. Can someone help?
Hello,
unfortunately I also have this problem. A solution would be great!
Greets,
BinaI posted this error on the new version many weeks ago and, despite promises, still no solution. I think it’s time to say fairwell to this team 🙁
Same issue
I also have this error, was a solution found?
Hi all,
I got this problem too. I changed the code of the theme in one line. As I’m not an expert for wordpress themes, php or similar things, use this solution with caution. I do not take responsibility for security issues or other malfunctions. The solution works the Travelify version 3.0.8. I didn’t check it for older versions.
So, here it is:
- make a backup
- open the file
wp-content/themes/travelify/library/structure/content-extensions.php - go to line 119:
$image .= '<a href="' . esc_url( get_permalink() ) . '" title="'.the_title_attribute( '', '', false ).'">'; - replace the line:
$image .= '<a href="' . esc_url( get_permalink() ) . '" >'; - reload your site
I suspect, something is not working properly with the alternative text for the link, so I removed this part of the line. But I think, this is only a workaround, the actual reason for this behaviour is unknown to me.
Again, before you do anything, make a backup and be sure, that you can restore everything in case of a malfuntion.
@navobel thanks for this but I’m afraid it doesn’t work. I’m using a Child Theme – any ideas on how to fix that please?
I found this solution in the colorlib forum and it worked for me
add this to the child theme’s style.css
.entry-meta-bar.clearfix .readmore { visibility: visible; } .entry-meta-bar.clearfix .entry-meta { visibility: visible; } .entry-meta-bar.clearfix { visibility: hidden; } #text { visibility: hidden; } article { visibility: hidden; } article * { visibility: visible; } header.entry-header, .entry-content, .entry-meta-bar { background: white; }@tanyakorteling , I’m using a child theme too and it worked for me (at least). But as adding CSS statements is much better than hacking the theme’s code, I strongly suggest to use the solution overide6 provided.
@overide6 thanks for sharing this solution!
(funny enough – at the colorlib homepage the travelify theme has this “bug” too)
thanks @overide6 it worked perfectly 🙂
@navobel I have tried your fix by editing wp-content/themes/travelify/library/structure/content-extensions.php .
However, in addition to line 119, I need to edit line 151 in the same way, i.e. remove the code about title.More suggestion on this. By comparing the code in previous version of the theme (3.0.7), I found that the old version used the function the_title() in the 2 lines mentioned, while in the latest version (3.0.8) the function the_title_attribute() is used instead.
The two functions are similar, but have subtle difference.
I found that, an alternative way to fix the problem is changing the function the_title_attribute to the_title in lines 119 and 151 of content-extensions.php .Thank you very much.
@navobel May I copy your precautions here.
Precautions: I am not an expert of wordpress themes, php or similar things. Use this solution with caution. I do not take responsibility for security issues or other malfunctions. Please make a backup before testing, so that you can restore in case of a malfunction. Thank you.About the php file
wp-content/themes/travelify/library/structure/content-extensions.php
After further investigation on the_title_attribute, I found that there is a syntax error.
As I have mentioned, in version 3.0.8 of the theme, the_title in line 119 and 151 of content-extensions.php was updated to the_tilte_attribute.
However, the code still keep following the syntax of the old function, so there will be a syntax error.
Although the_title and the_title_attribute are similar functions they have different syntax.the_title use this syntax
the_title( '', '', false )the_title_attribute use this syntax
the_title_attribute( array('before' => '' , 'after' => '' , 'echo' => false ) )However, the code used in version 3.0.8 is
the_title_attribute( '', '', false )
There is a syntax error, and as a result the code does not function as expected.My suggestion is as follows
Search for the code
the_title_attribute( '', '', false )
and replace with the code
the_title_attribute( array('before' => '' , 'after' => '' , 'echo' => false ) )Thank you.
@navobel May I copy your precautions here.
Precautions: I am not an expert of wordpress themes, php or similar things. Use this solution with caution. I do not take responsibility for security issues or other malfunctions. Please make a backup before testing, so that you can restore in case of a malfunction. Thank you.-
This reply was modified 5 years, 4 months ago by
punlf.
Thank you! @punlf that worked for me.
The topic ‘Plain post title above post image (Error)’ is closed to new replies.
