- This topic has 8 replies, 3 voices, and was last updated 2 years, 10 months ago by
David.
-
AuthorPosts
-
December 1, 2022 at 5:08 am #2444300
Oppo Gene
Hi there, I am using Ads, on my website without using plugin. Every time I add a New Post, I have to place the ad code manually, Can you guide me to place that code in theme function, so that every time I create a post it will be added automatically. One thing, the post format that have been used on website is WPDMPRO, “WordPress Download Manager Plugin”, A screenshot has been shared as an example
1 https://postimg.cc/K1hY0nr3
2.https://postimg.cc/HjfWLQNvThank You
Looking ForwardDecember 1, 2022 at 6:45 am #2444428David
StaffCustomer SupportHi there,
You can hook the adverts into your site using a GP Hook Element.
1. In Appearance > GeneratePress – activate the Elements Module.
2. In Appearance > Elements – Add New -> Hook Element:https://docs.generatepress.com/article/hooks-element-overview/
2.1 in the text area of the Hook, add your Ad Code.
2.2 Set the Hook to:generate_after_entry_header
https://docs.generatepress.com/article/hooks-visual-guide/#single-post2.3 Set the Display Rules to
Posts
->All Posts
This will add the advert before your post content for all posts.
December 1, 2022 at 12:14 pm #2445418Oppo Gene
Hi David, I have done so, but nothing happens, as you can check in screenshots, I have also tried after_content, in display rule, there is also option for downloads, I have also tried it but nothing happens, kindly guide the icon for ads that has been shared in previous screenshot, does it will show backend posts or not?
Screenshots
1. https://postimg.cc/Rq3t7wXj
2. https://postimg.cc/t1CZY6sv
3. https://postimg.cc/hzXX0qb9
4. https://postimg.cc/CdfZBSK0December 1, 2022 at 6:46 pm #2445936Fernando Customer Support
Hi Hassnain,
Can you leave the Hook to Post – All Posts, and provide a link to a Post on your site?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
As for the logo, are you referring to this?: https://postimg.cc/K1hY0nr3
If so, are you referring to it showing to the front end as opposed to the back end?December 3, 2022 at 1:31 pm #2448392Oppo Gene
(As for the logo, are you referring to this?: https://postimg.cc/K1hY0nr3
If so, are you referring to it showing to the front end as opposed to the back end?)It was just shared for an example that when I place ad code manually in the text area and when in visual mode this icon appear, further I have published a new post without adding ad code, all of the rest post contain ad code. URL has been shared. Kindly check
December 10, 2022 at 3:51 am #2456821Oppo Gene
Hi there, It been 7 days still waited for your reply
Thank You
December 10, 2022 at 5:10 am #2456894David
StaffCustomer SupportSorry you’re previous reply was overlooked, on rare occasions our help desk doesn’t see reply and we miss them. Please don’t hesitate to chase us if you have not heard with 24hrs.
The method i provided here does NOT add the code into the Post Editor, it Hooks it into the theme templates that are displayed on the front end.
If the code is not appearing on the front end then it may be the
WordPress Download Manager Plugin
is using a different template. Is the code still added to the site using the method i provided ?December 10, 2022 at 5:41 am #2456920Oppo Gene
Hi there, I have checked but not working. Didn’t see ad code the the template area
Screenshot
December 10, 2022 at 6:17 am #2456945David
StaffCustomer SupportChange the Display Rules in your Element to
Entire Site
.
Then let me know. -
AuthorPosts
- You must be logged in to reply to this topic.