Tagged: blog view
-
AuthorPosts
-
November 15, 2016 at 7:23 pm #712570
Dear Enfold
We need there to be a signature picture at the end of every blog post and are used to using the following code in functions.php file.
// Add Signature Image after single post add_filter('the_content','add_signature', 1); function add_signature($text) { global $post; if(($post->post_type == 'post')) $text .= '<div class="signature"><img src="http://www.houseofhuber.net/wp-content/uploads/2016/11/Signature_Nad_3_resize_small.jpg"></div>'; return $text; }
This works fine but, in some blog post overview elements it seems to get confused. See here http://prntscr.com/d7ncdd (home page) or here http://prntscr.com/d7ncrp (“/team” page). It’s important to point out, that this issue applies only to blog posts which have only one column (e.g. here where it is a different blog layout – there is no problem: http://prntscr.com/d7ndlz). Do you know how to fix this issue or if we have to use a different code within enfold to be able to use the signature?
Thank you very much and best,
RNovember 15, 2016 at 10:39 pm #712649Hey eKMUch!
can u please give us a link of 2 pages 1 that happen and one it is not?
Thanks a lot
Best regards,
BasilisNovember 16, 2016 at 2:13 pm #712894Hi Basilis
Thanks for the swift reply, as this is a quite urgent request.
Sure the links are below in private content (you need to be logged in to see them).
Thank you very much for helping
RNovember 17, 2016 at 4:32 pm #713630Hi Basilis
Any news on this?
We’re going online now. That means I had to temporarily remove the code from functions.php in order not to show a distorted page. But we’re still looking for a solution on this.
Thank you for looking into it,
RNovember 20, 2016 at 8:32 am #714426Hi,
The function is supposed to append the signature below the “the content” which is working as expected. It’s not working in the grid layout because it’s not using the “get_the_content” function. What do you want to do exactly?
Best regards,
IsmaelNovember 21, 2016 at 10:46 am #714737Hi Ismaesl
Thank you for your reply. Correct, it is displaying as expected below the content which is fine. This is not the problem. The problem is that the signature is displayed falsely in the “blog post” excerpt element when set to show a preview of posts in one column (not grid layout). It will then show the signatrue-picture below the “read more” button.
So instead of showing the signature only below the content (thus below the post) it also shows up on a weird place (below the “read more” button). For better understanding here again the two print screens where you see the signature picture popping up:
On the home page within the first “Blog Post” element with these settings http://prntscr.com/d9vmsm it will look like this: http://prnt.sc/d7ncdd Instead of not showing the signature as it should only show within the blog post itself but not in the blog post element which is set to only show an excerpt.
The same thing happens also on the team page, as you can see in the print screen here, where the signature is showing although it shouldn’t: http://prnt.sc/d7ncrp
It’s important to point out, that this issue seems only to occur when the “blog post” element is set to show excerpts in one column. The “blog post” element shows the blog posts correctly (meaning withouth falsely showing the signature in an “excerpt” setting) if the “blog post” element is set to have a “grid layout” as you can see here: http://prnt.sc/d7ndlz
So the problem is in “non grid” layout with the “blog post” element. Since there it falsely displays the signature picture below the excerpt.
I hope this clarifies your questions and you can help me with a solution on this.
Thank you very much and best,November 23, 2016 at 6:04 am #715716Hi,
It will display below the “Read More” link because the link is part of “the_content”. To make this simple, please provide a screenshot on where you want the signature to appear.
Happening here: http://www.houseofhuber.net/ (but only on the first “blog post” element) and here http://www.houseofhuber.net/team/
Not happening e.g. here: http://www.houseofhuber.net/blog/Again, it will not display on grid layouts or columned posts because it’s not using the “get_the_content” function which is prerequisite of using the “the_content” filter.
Best regards,
IsmaelNovember 23, 2016 at 11:31 am #715830Hi Ismael,
Thank you for your response. Ah now I understand what you mean, sorry.
The signature should be shown below every individual blog post – two screenshot examples below in private content.
I tried it with removing “the_content” from the code but then it doesn’t show the signature anywhere :(
Thank you for your help,
RaphaelNovember 25, 2016 at 5:54 am #716649Hi,
Thank you for the info. Please replace the code with the following.
// Add Signature Image after single post add_filter('the_content','add_signature', 1); function add_signature($text) { global $post; if(($post->post_type == 'post') && is_single()) $text .= '<div class="signature"><img src="http://www.houseofhuber.net/wp-content/uploads/2016/11/Signature_Nad_3_resize_small.jpg"></div>'; return $text; }
Best regards,
IsmaelNovember 25, 2016 at 6:53 pm #716989oooh! 😍 Works like a charm!!! you’re the best!
thank you so much!! :)
all the best,
rNovember 26, 2016 at 7:57 am #717157 -
AuthorPosts
- You must be logged in to reply to this topic.