I use Vantage on www.staffansandberg.se and would like to have some text on every page and post on my site (not search, archive and front page). The text is supposed to be between content and comments. I use a Facebook comments plugin. What file am I supposed to change to add the text?
Text between content and comments
This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.
Hi StaffanS,
I would add the code via the vantage_main_bottom or vantage_after_main_container actions (add_action()).
If you would rather edit a template, you would add it to either the footer.php (and run a is_singular() check) or you would add it directly to the relevant template files – single.php or page.php.
As always, please make sure that you’re using a child theme.
Thanks for the reply.
My intetion was to make it simle, just use echo to get the text.
My problem is to find where in the files I should write the code. This is a part of page.php in my child theme:
If I write my code under the “get_template” line, then I get the text above the content on the page. Under endif will write the code under the comments. I would like to have the code under the text on the page, but above the comments. I have the same problem with my single.php file,the text appear too high or too low.
This is a part of my single.php file:
Hi StaffanS,
I would add it under so I’m quite confused as to why it’s appearing before the content. Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.
This is an exemple when I write the code between get_template_part and comments_open in page.php. The text appears under the comments.
I have another problem with placements. I would like to have an ad under the content, centered to the content when I exclude the sidebar. I have this code in the end of my content-single.php:
The ad is published above the postnavigation as you can see on this page. Nothing happens if I move the code for the ad under the div. The ad will be displayed over the navigationbuttons if I move the adcode further down. I would like to have the ad under the buttons. I tried to put it in the footer.php, but then it will appear centered to the wholes page with the sidebar.
Hi StaffanS,
Ah. I ignored an important part of your post – you’re using Facebook comments which is why this isn’t a simple edit. So that plugin hooks into the_content (which as the name implies, is the post content) filter and appends itself to the end of it. To output something before you’ll need to add a hook with a priority higher than 10 and less than 100. For example, something like this:
Does that make sense?
I read some tutorials about hooks, but did not understand much, I don’t have enough knowledge about php. I have to spend more time to learn more about php before I test your solution.
Do you have any suggestions about how to put an ad under the post navigation aligned to the content on the page, not with the content and sidebar?
Hi StaffanS,
Understandable. Consider giving the code I provided a try as you should be able to modify that as a good base.
I’m kind of confused. You want it aligned with the content but not with the content and sidebar? As, you want it only to before the content but not before the sidebar? Is that correct? If so, place your code before this line:
Sorry for my bad English.
I would like to have the ad after the content and the post navigation, not before. This is an example of how I would like to have it. It works on all pages, but the next and previuos buttons are after the ad in my posts.
Hi StaffanS,
Hm. Try adding it after the following line:
Thanks! That worked :)
Good support was one of the most important criterias when I decided theme for my site. I haven’t been disapointed. I helped some friends to start their own sites, all of them use Vantage. :)