Search Results for 'amp'

Results from the Forum
nycinsider
Participant
#0

When you say to add something to a functions file, where exactly does it get added?

For example: https://forum.tagdiv.com/how-to-make-the-site-faster/
How and exactly where would I add this? I am not good with PHP so I don’t understand the tags. Also, somewhere I saw something about taking Contact Form 7 off every page by adding code – where was that? What would that look like here?

add_filter( ‘jpeg_quality’, create_function(”, ‘return 50;’ ) );

Here is the end of my functions.php

<div class="td-skin-scroll"><i class="td-icon-read-down"></i></div>
</div>
</div>
<div class="clearfix"></div>
<div class="td-set-hide-show"></div>
<div class="td-screen-demo" data-width-preview="380"></div>
<div class="td-screen-demo-extend"></div>
</div>

<?php
}

}

per123
Participant
#0

Hi,

Need some advice how’s best to build and organize a multilingual site?
I want to make one main / global site and few others for different countries with different content and languages.

Structure example:
Global page (English language)
– UK page (English language)
– USA page (English language)
– Ireland page (English language)
– German page (German language)
– French page (French language)

Plugins that I plan to use:
qTranslate X
https://hr.wordpress.org/plugins/qtranslate-x/

Country IP Specific Redirections
https://wordpress.org/plugins/country-ip-specific-redirections/

I couldn’t find any examples here on the forum from other Newspaper users so if there is any good example please paste it here. Thanks in advance for your help and suggestions

StuartStPaul
Participant
#0

I am in communication with an assist person at Adsense which is good. They tell me that Google search the Home Page for the ad code. I have used the THEME > ADS section and changed all the boxes by adding the AUTO sizing code they want. BUT she tells me there are three ads on my Home page with set sizes that won’t work. I need to change them to AUTO size to get approved. So, as this is meant to be an adsense friendly web site for easy use, why is it I can’t see any place to change what she can see at Google that is blocking, and how do I access these advert codes to change them. She sees this <script type=”text/javascript”>
var td_screen_width = document.body.clientWidth;
if ( td_screen_width >= 1140 ) {
/* large monitors */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:728px;height:90px” data-ad-client=”ca-pub-7683077456384976″ data-ad-slot=”7020021044″></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}
if ( td_screen_width >= 1019 && td_screen_width < 1140 ) {
/* landscape tablets */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:468px;height:60px” data-ad-client=”ca-pub-7683077456384976″ data-ad-slot=”7020021044″></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}
if ( td_screen_width >= 768 && td_screen_width < 1019 ) {
/* portrait tablets */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:468px;height:60px” data-ad-client=”ca-pub-7683077456384976″ data-ad-slot=”7020021044″></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}
if ( td_screen_width < 768 ) {
/* Phones */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:320px;height:50px” data-ad-client=”ca-pub-7683077456384976″ data-ad-slot=”7020021044″></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</div>

nairolf
tagDiv Member

Hi @enerjibes, if you use Yoast:
Go to titles &amp; metas/author archives and active the first option “author archives”.
If you are the only author, make noindex the option “meta robots”.

enerjibes
Participant
#0

Hello, my author page does not work. For example: if i click an author name, page goes to mainpage(home). Help me please ! (Example: http://www.enerjibes.com/author/sinansami/)

nairolf
tagDiv Member

Hi,

@bogdan-b
, nope i’m not using wp-super-cache


@anupviews
, yes I use WordPress 4.6 (the dropdown in Google Analytics was the same for 4.5 &amp; 4.6), like I say, after downgrade to 7.2 all things go to normal, the organic traffic is like always and in Alexa we won positions again (positions that we lost with the v7.3).

Bogdan B.
tagDiv Staff

Hello,

It seems that you have not created the mega-menu properly. That is why it breaks. You will have to remove the sub-categories in the menu element before making it a mega menu. You simply add the parent category and select the mega-menu option;. The theme will grab the subcats automatically.
example:
wrong mega menu: http://screencast.com/t/v1WzLENdw
right mega-menu: http://screencast.com/t/82UzWTWUjVx
You can read more about mega-menus here: https://forum.tagdiv.com/mega-menu/

Thank you!

Bogdan B.
tagDiv Staff

Hello,

Well as the guide specifies there are 3 parts of code. The first is the embed code itself You add that on the posts/pages themselves as it contains the video you want to embed with the video ID
The second code is a javascript code you can add in the theme panel custom js box: http://screencast.com/t/SYzBoxBIBZA (do not include the script open and closing tags)
The third is a css code you can add to the theme panel -> custom css box: http://screencast.com/t/nuvrxZCe again without the style tags opening and closing .
Here is an example how it worked on my end:
first code on a post in text mode: http://screencast.com/t/mo1wvTtyk
second and third codes in the theme panel spots: http://screencast.com/t/ltfk3LkGD

Thank you!

Bogdan B.
tagDiv Staff

Here is an example of how it looks like on my end:
http://screencast.com/t/tAciKT0w and the code: http://screencast.com/t/zUiK17pvrP
Thanks.

euklidis
tagDiv Member

I cannot find the way to fix this like the tech sample page. whatever i do the same problem appears. I add a menu with subcategories and declare the mega menu to point on it self. Is that wrong? http://prnt.sc/c9sbau

Bogdan B.
tagDiv Staff

Hello,

1) Stretching the logo is a bad idea as it will loose lots of it;s quality .if you want a bigger logo, you will have to create a bigger logo in your photo editor. The theme cannot stretch it and prevent quality loss.
Here is an example of such a logo: http://demo.tagdiv.com/newspaper_cars/
Here is the size of your logo: http://themidfieldgeneral.com/wp-content/uploads/2016/08/Untitled-design-10.png and here is the size of the cars logo: http://demo.tagdiv.com/newspaper_cars/wp-content/uploads/2015/08/header-red-contrast.jpg
Here is an example of what happens if I try to stretch the logo: http://screencast.com/t/TKNCnSgWEeV

2) For mobile you are using the mobile theme plugin so there is a special footer location for the m,obile footer menu and the desktop footer menu, Please access the manage locations section of the menu and select menus for each location: http://screencast.com/t/AFl9HaVgM

Thank you!

Bogdan B.
tagDiv Staff

Hello,
Well for a custom ad it will display in the size you upload it. It will automatically be responsive if you wrap it inside the provided div’s like this one for example:
<div class="td-all-devices"><a href="#"><img src="#"/></a></div>
The div’s are created to be responsive so they will position properly. Please provide an example of such an ad that does not position properly. Provide a link to your site so we can inspect it.
Thank you!

Equapio
tagDiv Member

Thanks Bogdan! It seems to work altough i don’t see an ad yet…probably takes a bit.

What’s the code like if i need to display 2 ads? Lets say after the 2nd and 4th exerpt?

Do i need to repeat the if part?

if (is_tag() &amp;&amp; ($adcounter == 2)) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);
}

if (is_tag() &amp;&amp; ($adcounter == 4)) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_2"]‘);
}

Appreciate one last tip here.

Thank you!

jsup
tagDiv Member

I tried to post the modified code but the editor here stripped some of the code. If you would like the full example, I can post it on a temporary web page for you to retrieve external to here..

jsup
tagDiv Member

In the versions I have been running with, I just added an extra line and a check – you could probably achieve this more “cleanly”, but here’s my modification (I added in $GCN to store the number of comments, then I tested for it being greater than 0 – fairly straightforward I thought):

**UNFORTUNATELY – This editor stripped some code from the sample. I can’t post the code here 🙁

This would need to be replaced in the following files (from memory – I haven’t looked since June):

~/includes/modules/td_module_slide.php
~/includes/wp_booster/td_module.php
~/includes/wp_booster/td_module_single_base.php

Of course, if you have not set up a child theme, you will lose these changes upon next update.

NOTE: The sample code above is provided as is and there is warranty on its performance or effectiveness. Use this code at your own risk. If you are not sure what you are doing, don’t do it. The code may reference a version of the theme that is different to yours. Always compare the code with your existing code before replacing anything.

  • This reply was modified 10 years by jsup.
Catalin
tagDiv Staff

Hello patilabo,

Please keep in mind that above I have you a basic example, what you can achieve to change the size for your logo. Please notice that is not a simple task to do that because all settings are related to each other. The logo from this type of header style has been designed to be inline with the menu items and the size of it will be automatically adjusted according on width devices. Unfortunately, we cannot provide custom work at the moment and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you or also, you can change the header style 5 with another one wich has the logo in full width, as example header style 10.
For more information about our header styles, please check here -> https://forum.tagdiv.com/header-styles/

Thanks for your understanding!

kuaza
tagDiv Member

This working:

wp-super-cache/wp-cache-phase1.php

find:
if ( function_exists( "apply_filters" ) ) {

replace:
if ( function_exists( "apply_filters" ) &amp;&amp; has_filter( 'supercache_filename_str' )) {

billspyropoulos
tagDiv Member

I came up with a good solution for now. Go to
wp-content/themes/Newspaper/includes/widgets/td_page_builder_widgets.php

and add the following code

class td_block_trending_now_widget extends td_block_widget {
var $td_block_id = 'td_block_trending_now'; // change only the block id, the rest is autogenerated
}

add_action('widgets_init', create_function('', 'return register_widget("td_block_trending_now_widget");'));

this will make a “news ticker” widget and then you can use it via php with the wordpress function


<?php the_widget( 'td_block_trending_now_widget' ); ?>

Althoug its working if you need to customize it (ex. number of post shown) you have to pass a second var on the function which is the array containing the attributes with their values. My next question is
what are these attributes. For example if i want 10 posts from category “World” what should i write?


args = array(
post => 1,
cat => 'World'
);
the_widget( 'td_block_trending_now_widget', $args );

Bogdan B.
tagDiv Staff

Hello,

Custom ad positions and conditions must be added in the php files directly as our theme has no such options.
you can use a do_shortcode function and a is_category function to check for the category itself.
Here is an example: http://screencast.com/t/maoyrOlqc

 <?php if (is_category( 'Gadgets' )){
            echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
        }; ?>

Thank you!

ryanpower
Participant
#0

Good morning, I hope you can help as I’ve a couple of minor issues with my site.

1. I wanted to know first if there is a way to stretch the logo across the width of the page as opposed to it occupying a small box in the centre of the page?

2. I’m struggling with the footer menu which I can’t get to display. I want to have my privacy policy and T&Cs down there and whilst I’ve made a custom menu and added those items to it, it won’t display on any page.

Some help would be appreciated! My site is at http://themidfieldgeneral.com

Thanks!

Equapio
tagDiv Member

Hi Bogdan,

thanks for your help. I figured that changing the condition should do it. Unfortunately it didn’t work on my end.

On the tag page it returns [td_ad_box spot_id=”custom_ad_6″] after the specified post exerpt.

Here is the code in the loop.php:

if (have_posts()) {
while ( have_posts() ) : the_post();
$adcounter++;
echo $td_template_layout->layout_open_element();

if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, ‘Missing module: ‘ . $td_module_class);
}

echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();

if (is_tag() &amp;&amp; ($adcounter == 2)) {
echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_6″]’);
}

endwhile; //end loop
echo $td_template_layout->close_all_tags();

I just added custom ad 6 &amp; 7 but tried it with custom ad 5 too. Also tried it with the Ad inserter plugin which didn’t work either. Their support told me to try it with a php function.

Can you find what’s wrong? Why doesn’t it work? Is there another way?

Really appreciate your help on this.

Catalin
tagDiv Staff

Hello themesic,

If you need to add some things below posts loop in a post, please notice that you will have to use the same method which I have presented you above, named do_shortcode and you will have to place it in the corresponding loop single template with your post template used by you. For example, if you are using the Post Template Style 1, you will need to add that snippet of the code in loop-single-1.php core file in order to achieve good results, like this -> http://screencast.com/t/EIo5hfLusV5 and the result you should see here -> http://screencast.com/t/Fpibc4JGqD

I hope that helps! If is not what you mean, please be more specific, provide more details and also you can send us some useful screenshots so I can understand it better what you mean.

Thanks for your understanding!

wordnow
Participant
#0

The Visual Composer Video Player element is not picking up the Newspaper theme styles for the widget title. See this example on my development site. The element is the first one at the top on the right side.

stax
Participant
Pagination - topic
#0

How i can enable pagination on page ?

Example: Page have 7 posts and it is maximum. If you add a new post, automatically creates a new page that starts oldest post and the 7 remains on the first page .
And on the bottom of the page have pagination. Something that every news website have.

Something like this: https://postimg.org/image/u43bocqkb/

And thank you, I’m really pleased with the theme , and grateful for your support that I have had all time .

pacoesni
Participant
#0

Hi guys, It’s me again. I was wondering to know if there is a possibility to change the menu just for the homepage. I just want to create a menu without “the previews”. Let me explain with examples:

I want to create and modified the menu with the menu editor on WordPress and then use it as the menu just for the homepage. In this menu I just wanna include links for categories, like this:

http://prnt.sc/c9gg34

The rest of the blog, it would be using the regular menu. The menu I choosed from the Newsmag Theme Panel. That one where I’m going to activate the meta menus:

http://prnt.sc/c9gfir

Is this possible?, how?

Viewing 25 results - 31,676 through 31,700 (of 38,683 total)