-
Author
-
March 31, 2016 at 22:07 #113936dsnicheParticipant
I want to place Google Adsense units on the Search/Members page, in the search results section. Where should I place my Adsense code?
April 1, 2016 at 19:13 #114156RaduModeratorHi,
Add this function to your child theme functions.php file (wp-content/themes/sweetdate-child/functions.php)
COPY CODEfunction sq_add_adsense_to_member_directory() { echo ' <div style="width:728px;height:90px;background-color:red;"></div> '; } add_action('bp_before_directory_members_content','sq_add_adsense_to_member_directory');
Replace
<div style="width:728px;height:90px;background-color:red;"></div>
with your adsense code.Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 1, 2016 at 23:01 #114174dsnicheParticipantThanks Radu, that placed a box at the top of the page before the search results (pic 1). Can I place an ad unit between the rows of search results (pic 2)?
Attachments:
You must be logged in to view attached files.April 1, 2016 at 23:03 #114177dsnicheParticipantPic 2
Attachments:
You must be logged in to view attached files.April 4, 2016 at 18:20 #114448RaduModeratorYou will have to upload the attached file after you unzip it to wp-content/themes/sweetdate-child/members/members-loop.php
Then you will have to paste your adsense code between
COPY CODE<div style="width:728px;height:90px;background-color:red;display:inline-block;"> //ad-here </div>
You can remove width:728px;height:90px;background-color:red; the display:inline-block; is required.
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.April 18, 2016 at 16:46 #117262RaduModeratorJust give a padding-top:20px; to that div it will resolve the problem
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 30, 2016 at 00:18 #119774dsnicheParticipantHi Radu, thanks but that didn’t change the alignments. I changed the code to:
Is this correct?
April 30, 2016 at 00:21 #119775dsnicheParticipant<div style="width:728px;height:90px;background-color:red;display:inline-block;padding-top:20px;">
May 3, 2016 at 16:29 #120026RaduModeratorHi,
Yes but if this doens’t have effect, you can try with this
COPY CODE<div style="width:728px;height:90px;background-color:red;display:inline-block;margin:20px 0 !important; clear:both !important;">
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 4, 2016 at 01:33 #120192dsnicheParticipantRadu, that moved the box a little lower, which I like. But the alignments of the profiles below the box are still the same.
May 4, 2016 at 18:21 #120292RaduModeratorOk,
Add this css to wp-admin -> theme options -> styling options -> quick css
COPY CODE#members-list .four.columns:nth-child(3n+1) { clear: none !important; }
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 5, 2016 at 23:07 #120621dsnicheParticipantCan I also add another Adsense unit two rows down, before the last row of the search results?
May 6, 2016 at 20:15 #120775RaduModeratorUse the attached file
If you need other custom modifications look for a developer
Cheers
R.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.May 10, 2016 at 17:47 #121173RaduModeratorGreat
Have a nice week
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.