Add text under each article
I would like to add a text under each article of my blog.
I have prepared a php file : add-to-article.php
Where must I type <?php include(‘add-to-article.php’); ?>
I have tried in article.php but the text is displaying under comments, but not just under the end of the article.
Merry Christmas to all!
AnonymousDecember 24, 2011 at 4:13 pm #21688
Link to site?
Did you try with action_hooks?
Where under article? Under post? Under page?
I assume it’s under post, so you can try add action_hook widget in loop.php, (maybe graphene_afer_post_content) and add WP PHP widget with code in it.
Here is a link to an article of my blog :
I would like to add a text under each article of my blog, just under :
Education du cheval
Can I use <?php include(‘add-to-article.php’); ?>
(add-to-article.php contains the text)
AnonymousDecember 24, 2011 at 4:25 pm #21690
You no need to add any extra file to the theme. Just use action hooks to display some text after each post.
Go to Graphene Options –> Advanced –> Action Hooks Widget Areas –> loop.php and select an action hook of your choice. I think you can use
More information on using Graphene action hooks is here – Graphene Action Hook Widgets â€“ an easy way to modify your blog
Just a precision…
The taxt displays correctly under each post. Cf here :
http://www.education-du-cheval.com/blog/livres-et-dvd-recommandes/le-travail-a-pied-de-votre-cheval-1518.html (text= “Cet article vous a plu ? Partagez-le !…”)
But on the home page (http://www.education-du-cheval.com/blog/), the text displays wrongly:I don’t need this text displays on the home page.
Is is possible to display the text only on the articles and not on the home page?
In the widgets section, I can see :”Widget Logic options”, with “widget_content’ filter and Use ‘wp_reset_query’ fix checkboxs.
I can’t see widget logic field…
Where and how can I add is_single() into widget logic field in your graphene_after_post_content widget please?
Sorry, I have found the widget “Meta” and filled is_single() i,to logic field.
But now; meta appears afer each article, it is not what I need.
On the homepage the text displays wrongly:I don’t need this text displays on the home page.
- You must be logged in to reply to this topic.