Site logo

Archived topic

Manual Modification

8 replies · Started by Oppo Gene on December 1, 2022

Viewing posts 1–9 of 9

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/HjfWLQNv

Thank You
Looking Forward

Hi 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-post

2.3 Set the Display Rules to Posts -> All Posts

This will add the advert before your post content for all posts.

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/CdfZBSK0

(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

Hi there, It been 7 days still waited for your reply

Thank You

Sorry 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 ?

Change the Display Rules in your Element to Entire Site.
Then let me know.

This archived topic is closed to new replies.