Forum Replies Created

Viewing 15 replies - 76 through 90 (of 3,827 total)
  • Plugin Contributor ampforwp

    (@ampforwp)

    Hi @granola,

    May I know how you’re visiting your site via mobile? Are you visiting directly by entering the URL or by using the google search engine?

    And I’ve visited your website via Google search engine and it showing the AMP version on the mobile device. However, if you want to move your mobile users to fully AMP version on mobile and tablet devices, you can use our “Mobile Redirection” option. You can find this option in AMP > settings > Advanced settings > Mobile Redirection.

    Screenshot: https://take.ms/ddo2C

    Hope it helps.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @kennybiz64,

    Sorry for the delay in response.

    When you select the swift theme, Did you get any validation AMP errors or any warning AMP issues? You can test the AMP URL for validation & warnings here: https://validator.ampproject.org/

    For testing purpose, select the swift theme and test the AMP URL by using the above the URL & let me know whether you get any issues or not.

    Thank you

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @seriou5,

    Right now, for the single post, we don’t have a similar check. But the alternative solution you can do is, we can customize the code for the sigle post only. For testing purpose please copy and paste the below code in the theme’s functions.php file and check whether the solution is working or not.

    
    add_action('ampforwp_body_beginning','ampforwp_custom_amp_pixel');
    function ampforwp_custom_amp_pixel(){
    	if(is_single( )){
    		add_filter ('the_content', 'ampforwp_with_worthy_onContent');
    		add_filter ('the_content_export', 'ampforwp_with_worthy_onContent');
    	}
    }
     
    function ampforwp_with_worthy_onContent ($content) {
          // Check if there is an export running
           if ((current_filter () == 'the_content_export') && ($GLOBALS ['wp_the_query']->post))
            return $this->markerAdd ($content, $GLOBALS ['wp_the_query']->post, 'export');
          
         /* // Skip this function if we are not on the main-query
          if (!$this->onMainQuery)
            return $content;*/
          
          // Only output markers on single pages
          if (!($GLOBALS ['wp_the_query']->is_single || $GLOBALS ['wp_the_query']->is_page))
            return $content;
          
          // Try to append marker to content
          return $this->markerAdd ($content, $GLOBALS ['wp_the_query']->post, null);
        }
    

    Hope it helps.

    Thank you

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @vivireuropa,

    Glad to hear the issue has been fixed.

    May I know what you’ve done to resolve the issue?

    Thank you.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @geniuxcode,

    Glad to hear the issue has been fixed. If you have any other queries feel free to create a new topic.

    Thank you.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @foodstyling,

    We’re soon adding the above GitHub ticket in the upcoming updates. Hope you’re all issues will get fixed.

    Thank you

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @robbo55,

    May I know how you’re adding the Ads in AMP pages? It seems you’re using the third party plugin to insert the Ads in AMP.

    For the temporary solution, you can use the custom CSS to hide that gap between the Ads. Please add the below code in the “Custom CSS” option and check whether the issue is resolved or not. You will get this option in AMP > Design > Global > Custom CSS. Screenshot: https://take.ms/sZ3Xh

    
    .amp-wp-content.the_content .mh-content-ad{
    display:none;
    }
    

    Hope it helps.

    Thank you

    • This reply was modified 6 years ago by ampforwp.
    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @thatmme,

    The issue is really strange.

    Can you please share the plugins list which is activated on your end? and also please share the screenshot of the AMP panel’s SEO settings. So, that I can check the settings and help you to resolve the issues.

    Thank you.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @infopost,

    I’ve checked the URL and it’s validated & working perfectly. Google takes some time to update & recrawl the AMP pages in the Google cache. I recommend you to wait for some times and check whether the issue is resolved or not.

    Hoe it helps.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @psychobreak,

    I’ve checked the URL, it seems the issue has been fixed. Screenshot: https://take.ms/WEoY6

    Can you please check once on your end.

    Thank you

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @j700group,

    In tag pages, we’ve not added the H1 tag for the swift theme. However, you can change the H1 tag using custom code. Please follow the below steps to add the custom H1 tag for tag/ archive pages.

    Steps:
    1. Go to your theme folder and create a new folder & named as “ampforwp”. Screenshot: https://take.ms/qJlnd

    2. Then open the ‘ampforwp’ folder (which we created) and create a new file named as “archive.php”. Screenshot: https://take.ms/NKEh6

    3. And then open the ‘archive.php’ file, copy & paste the below code:

    <?php global $redux_builder_amp;
    amp_header() ?>
    <div class="cntr archive">
    	<div class="arch-tlt">
    		<?php 
    		if(function_exists('ampforwp_custom_archive_title')){
    			ampforwp_custom_archive_title();
    		} ?>
    	</div>
    	<div class="arch-dsgn">
    		<div class="arch-psts">
    			<?php amp_loop_template(); ?>
    			<?php amp_pagination(); ?>
    		</div>
    		<?php 
    
    		if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
    		<div class="sdbr-right">
    			<?php 
    				$sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
    			if ( $sanitized_sidebar) {
    				$sidebar_output = $sanitized_sidebar->get_amp_content();
    				$sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
    			}
                echo $sidebar_output;// amphtml content, no kses
    			?>
    		</div>
    		<?php } ?>
    	</div>
    </div>
    <?php amp_footer()?>

    4. After pasting the code, please save the code. And goto the “theme’s functions.php” file. Screenshot: https://take.ms/BOtGf

    5. At the end of the functions.php file, please copy & paste the below code:

    if(!function_exists('ampforwp_custom_archive_title')){
    function ampforwp_custom_archive_title(){
    		global $redux_builder_amp;
    	if( is_author() ){
    		$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
    		if( true == ampforwp_gravatar_checker($curauth->user_email) ){
    			$curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
    			if($curauth_url){ ?>
    				<div class="amp-wp-content author-img">
    					<amp-img src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
    				</div>
    			<?php }
    	}
    }
    	if ( is_archive() ) {
    		$description = $sanitizer = $arch_desc = '';
    	    the_archive_title( '<h1 class="amp-archive-title">', '</h1>' );
    	    $description 	= get_the_archive_description();
    		$sanitizer = new AMPFORWP_Content( $description, array(), 
    			apply_filters( 'ampforwp_content_sanitizers',
    				array( 
    					'AMP_Style_Sanitizer' 		=> array(),
    					'AMP_Blacklist_Sanitizer' 	=> array(),
    					'AMP_Img_Sanitizer' 		=> array(),
    					'AMP_Video_Sanitizer' 		=> array(),
    					'AMP_Audio_Sanitizer' 		=> array(),
    					'AMP_Iframe_Sanitizer' 		=> array(
    						'add_placeholder' 		=> true,
    					)
    				) ) );
    		$arch_desc 		= $sanitizer->get_amp_content();
    			if( $arch_desc ) {  
    				if ( get_query_var( 'paged' ) ) {
    		        $paged = get_query_var('paged');
    		    } elseif ( get_query_var( 'page' ) ) {
    		        $paged = get_query_var('page');
    		    } else {
    		        $paged = 1;
    		    }
    				if($paged <= '1') {?>
    					<div class="amp-archive-desc">
    						<?php echo $arch_desc;// amphtml content, no kses ?>
    				    </div> <?php
    				}
    			}
    	}
    	if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
    		$parent_cat_id 	= '';
    	    $cat_childs		= array();
    	    $parent_cat_id 	= get_queried_object_id();
    	 	$cat_childs 	= get_terms( array(
    	  						'taxonomy' => get_queried_object()->taxonomy,
    	  						'parent'   => $parent_cat_id )
    						);
    		if( !empty( $cat_childs ) ){
    			echo "<div class='amp-sub-archives'><ul>";
    			foreach ($cat_childs as $cat_child ) {
    				 echo '<li><a href="' . esc_url(get_term_link( $cat_child )) . '">' . esc_attr($cat_child->name) . '</a></li>'; 
    			}
    			echo "</ul></div>";
    		}
    	}
    	if(is_search()){
    		$label = 'You searched for:';
    		if(function_exists('ampforwp_translation')){
    			$label = ampforwp_translation( $redux_builder_amp['amp-translator-search-text'], 'You searched for:');
    		}
    		echo '<h3 class="amp-loop-label">'.esc_attr($label) . '  ' . esc_attr(get_search_query()).'</h3>';
    	}
    }
    }

    6. Save the file.

    Now the h1 tag will appear on the tag pages. Remember, please give the same name files which I’ve given in the above the steps.

    Hope it helps.

    Thank you

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @leadsoft,

    Can you please share the exact URL? I’ll check and help you to resolve the issue.

    Thank you.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @clarionwpdeveloper,

    May I know which version of AMPforWP plugin you’re using? Could you please update the plugin to the latest version and check whether the issue is resolved or not?

    And also please share the exact error message which you’re getting.

    Please let us know.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @curvehunter,

    Glad to hear the issue has been resolved.

    It seems you’ve activated both plugins at a time.

    Plugin Contributor ampforwp

    (@ampforwp)

    I totally agree with both of you. I agree that we need to do a better job at fixing bugs and helping the users.

    Thank you for educating us on we can handle such queries, We will try to improve our process as much as possible.

Viewing 15 replies - 76 through 90 (of 3,827 total)