Thanks for the reply Catalin, I’ll certainly look into fixing all you’ve outlined above. Can you also let me know in regards to the main demo found here: http://demo.tagdiv.com/newspaper/ is the mobile theme plugin activated there? If it is, How are you guys still able to have a customized homepage on mobile phones while using the mobile theme? When I checked from my phone it looks completely customized, but the menu appears to be the new mobile menu. So it the mobile theme is activated there as well, or just the new mobile menu in use?
Additionally. On your demo here: http://demo.tagdiv.com/newspaper/ is the mobile theme activated? If it is, How are you guys still able to have a customized homepage on mobile phones while using the mobile theme?
HI Bogdan, to be clear, I was not trying to make the linked image in a modal. It just did that by itself. I still don’t know how or why it did that. What I wanted was a simple centered image that clicks through to the link it was assigned on an external website. But at any rate, by manually typing in my hyperlinks and centering the paragraph that the image is placed in, it seems to work like it should again.
The issue I am now concerned about going forward is, will each time I add an image (and even if I set the modal to be OFF) it still shows in a modal and then affects the link. Ever seen this happen with anyone else?
Ok quick update..it seems when I manually add the link in the “Text mode” of the editor and save it, it worked fine. But if I try to center align the image it goes back to not working.. Any ideas?
Edited to add: if I wrap the image in a p tag and center the p tag that seems to work. But manually centering the image itself and adding a link seems to cause the issues I mentioned above.
-
This reply was modified 10 years by
shae101s. Reason: added minor fix
Hey all, just me again. Ok..back to the child theme thing. What files exactly would I place in the child theme folder and where? I want to be sure I do this right. I created the page-full-blank.php file and copied the text code linked above into it, then uploaded that completed file into the Child Theme folder. But what should I do for the JS file you mentioned above?
Also how would I place the codes for hiding ads that goes into the Tag-Booster file (as mentioned in this thread) into a Child Theme so that when the main theme gets updated I don’t have to always manually re-add the codes?
THANKS!
Oh question before I forget, can we somehow make these changes using a Child Theme, so that each time NewsPaper updates we wouldn’t have to go back in and paste the lines of code? Or must we always do it in the main file folder?
Excellent! Will definitely be implementing this because I am moving my site over and really need to make landing pages with my existing NewsPaper 6 theme.
Hey reloaded, did you set specific ones for each ad. For example if you’re targeting the top ad, you want the code to say hide_top_ad
Here’s the entire lines of code for the full ad section in the file found in the wp-booster folder:
/* ----------------------------------------------------------------------------
ad support on content
*/
//read the current ad settings
$tds_inline_ad_paragraph = td_util::get_option('tds_inline_ad_paragraph');
$tds_inline_ad_align = td_util::get_option('tds_inline_ad_align');
//add the inline ad
if (td_util::is_ad_spot_enabled('content_inline') and is_single() and !get_field('hide_inline_ads')) {
if (empty($tds_inline_ad_paragraph)) {
$tds_inline_ad_paragraph = 0;
}
$cnt = 0;
$content_buffer = ''; // we replace the content with this buffer at the end
$content_parts = preg_split('/(<p.*>)/U', $content, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$p_open_tag_count = 0; // count how many <p> tags we have added to the buffer
foreach ($content_parts as $content_part_index => $content_part_value) {
if (!empty($content_part_value)) {
// Show the ad ONLY IF THE CURRENT PART IS A <p> opening tag and before the <p> -> so we will have <p>content</p> ~ad~ <p>content</p>
// and prevent cases like <p> ~ad~ content</p>
if (preg_match('/(<p.*>)/U', $content_part_value) === 1) {
if ($tds_inline_ad_paragraph == $p_open_tag_count) {
switch ($tds_inline_ad_align) {
case 'left':
$content_buffer .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_inline', 'align' => 'left'));
break;
case 'right':
$content_buffer .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_inline', 'align' => 'right'));
break;
default:
$content_buffer .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_inline'));
break;
}
}
$p_open_tag_count ++;
}
$content_buffer .= $content_part_value;
$cnt++;
}
}
$content = $content_buffer;
}
//add the top ad
if (td_util::is_ad_spot_enabled('content_top') and is_single() and !get_field('hide_top_ad')) {
$content = td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_top')) . $content;
}
//add bottom ad
if (td_util::is_ad_spot_enabled('content_bottom') and is_single() and !get_field('hide_bottom_ad')) {
$content = $content . td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_bottom'));
}
return $content;
}
You can see each of the different ad placements (top, inline and bottom) have their own name and respective field in ACF.
Hey Alin, yep, I am only referring to your demo site, it’s helpful for us to go there and view these things when/if needed (sometimes to also help us with styling examples etc, and to make sure stuff on our end is behaving as expected).
Hope it’ll be soon, thanks! 🙂
Ok, tried it again..and now it works (still gives me a pre-warning, but when I click proceed anyways, it now actually goes to the site). @gfran5
I definitely DO NOT have malware on my comp. I follow through all other links here with no issue, it only comes up for your site. So I’m not sure @gfran5
That link gfran5 posted shows up as spam when you click it, and if you follow through (aka ignore warning by your browser) you see even more spam. Smh
Thank you Andrei! That will set me up for a good start and I definitely will see if I can find a good developer for any other customizations I’d want to do to the theme. 🙂
Not sure what quiz plugin they use, but I have to say their site is the best NewsPaper based site I’ve come across! I’ll see if I can ask them what quiz they are using.
Hey guys, any updates on this? I’d still really love to be able to create a truly BLANK page using your themes for landing page/other page design purposes on my site.
Thanks for the update Alin, hopefully they find a solution soon. A blank page would be a great addition to the theme so we can create stuff like custom landing pages without pulling in the header and footer if we don’t need them.
Definitely keep me posted when this is available.
Hi, no I did not disable anything. The ads are served dynamically from the Ad Network, so it doesn’t always show up (which I why I did the screenshots). Is there no way to just explain how to completely enlarge the margins of the site itself?
NOT MY SITE!
Another great site example that uses the NewsPaper platform is http://youbeauty.com
Thank you Emil! It worked. I did edit it and used the pasted in code from the original post, but I guess for whatever reason it copied over weird in the editor. Fixed it and now it works! 🙂
I’m really hoping I can get some help on this issue ASAP.
I followed the new guide to adding the code, but now I have other issues following the tutorial.
Now that I’ve found the right file and I’ve added the codes as outlined above, I’m running into other issues. I followed the steps to add the code based on the field names I made (I created three hide_inline_ads, hide_top_ad and hide_bottom_ad) so it would have been easier for me to identify which is which. I placed in the code like you can see in this image:

But for some reason now when I check the posts themselves on the frontend nothing shows up (I’m currently testing this on my staging site). Any ideas what’s wrong in the code?
Here’s how the front end looks when you visit a post:

And this is the ACF fields added:

Any ideas what’s going on?
Can anyone please help me figure out what’s wrong and why it’s not working?
Hey Alin! Thanks, now that I’ve found the right file and I’ve added the codes as outlined above, I’m running into other issues. I followed the steps to add the code based on the field names I made (I created three hide_inline_ads, hide_top_ad and hide_bottom_ad) so it would have been easier for me to identify which is which. I placed in the code like you can see in this image:

But for some reason now when I check the posts themselves on the frontend nothing shows up (I’m currently testing this on my staging site). Any ideas what’s wrong in the code?
Here’s how the front end looks when you visit a post: 
And this is the ACF fields added: 