tropauer
Forum Replies Created
-
Thanks! Probably I’ll proceed as you described, at least so far I cannot use a standalone only-AMP version.
As the AMP version has everything I need the standalone only-AMP option would be better for me.
However I understand that your solution is working perfectly and is also the most adopted nowdays (and also the only possible way to include non AMP compatible widgets). Just it is more difficult for my case because I need to tweak or change my present canonical theme to match look/feel of an AMP version.
Thank you frenchomatic!
Google says here:
It is possible to create a standalone AMP page, which is a page that doesn’t have a canonical. In this scenario, the canonical link is still required, but should point to the AMP article itself.The The AMP Project website itself has no caonical urls.
You can read about the standalone-mode of an another AMP plugin here and see a demo here.
I could mantain alongside the light AMP version of my website a heavier (and different looking) canonical version, but it would be much more efficient to have a standalone AMP website.
As I understand the solution requires two things:
1. Do not append /amp to the URLs of the AMP pages.
2. Add a canonical link to the head of each AMP page pointing to itselfHowever I’m not a geek and I don’t know how to proceed…
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Hide content in ampThe CSS way works nicely!
There was just a previous mispelled line in my css preventing it to work.Thank you very much! Everything is clear now.
The Booking.com logo is displayed correctly and also all the rest seems working fine.
Thank you very much for your reply!
Now is clear that I don’t have to declare anything in the cookie policy.
Should I declare anything in the EU conform privacy policy?
Maybe I should mention that the booking service available via the searchbox is provided by Booking.com and quote or link your privacy policy.Thank you very much!
I really enjoy your plugin!
Hi,
My hosting provider have increased memory_limit for my domain in .htaccess file and now everything works fine: no error message after scanning and the local restore is perfect!
I left in wp-config.php file this addition:
define('WP_MEMORY_LIMIT', '2000M');
Just tell me please if you think that it would be better delete it for any reason.BTW Thank you very much for this wonderful plugin!
Thank you Cory for the wonderful plugin! ??
Problem solved! ??
It was caused by a conflict of RokSprocket plugin with my specific hosting environment.
You can find the solution (commenting out 3 lines of php code) here.
Forum: Fixing WordPress
In reply to: Wrong featured image linksProblem solved! ??
It was caused by a conflict of RokSprocket plugin with my specific hosting environment.
You can find the solution (commenting out 3 lines of php code) here.
Thank you Cory!
Before posting I’ve already checked your FAQ page.
However it’s not your plugin’s failure, but some general interaction problem in my specific live hosting environment (Servage).
All local installs work correctly and I’ve discovered that also sites set up directly on the live domain has the same problem. So it doesn’t depend on migration and your plugin.
For some strange reason in the featured image sources (and only there) a string containing reference to the mounted storage is attached before all the right links and the results are wrong links (that inside contain also the good ones). ??
By the way, your plugin is very nice! ??
Forum: Fixing WordPress
In reply to: Wrong featured image linksI’ve set up a demo of the problem also here: https://andras.info
Forum: Fixing WordPress
In reply to: Wrong featured image linksThank you again Morteza!
This is a very barebone demo of the problem and I did not apply any modification to theme and the base plugins (gantry + rokcommon + roksprocket from RocketTheme) and there are no other plugins installed.
I’ve tried many installations and also with other theme and it’s a general problem in my hosting environment.
However on my xampp localhost it always works perfectly (I’ve tested with many installations).
I don’t know why/how on the domain server (Servage) the string “https://biro.name/wp-content/home43b/sub001/sc27622-OTFB/” is attached at the beginning of the links. Without this string the links are correct.
Just I don’t know how to stop this strings to be attached. I’ve tried removing them from the MySQL database with interconectit find and replace, but they get regenerated somehow.
Forum: Fixing WordPress
In reply to: Wrong featured image linksThank you, Morteza!
This demo is not using a static homepage (but with a static homepage I’ve got the same results).
The website is using RocketTheme’s RokSprocket Mosaic Layout wich is set to show the page’s Featured Image (wich work works perfectly on my localhost).
The index.php:
<?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp-blog-header.php' );
The page.php:
<?php /** * @version 1.0 May 14, 2013 * @author RocketTheme https://www.rockettheme.com * @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ // no direct access defined( 'ABSPATH' ) or die( 'Restricted access' ); ?> <?php global $post, $posts, $query_string; ?> <div class="item-page"> <?php if ( have_posts() ) : ?> <?php /** Begin Page Heading **/ ?> <?php if( $gantry->get( 'page-page-heading-enabled', '0' ) && $gantry->get( 'page-page-heading-text' ) != '' ) : ?> <h1> <?php echo $gantry->get( 'page-page-heading-text' ); ?> </h1> <?php endif; ?> <?php /** End Page Heading **/ ?> <?php while ( have_posts() ) : the_post(); ?> <?php $this->gantry_get_template_part( 'content/content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); ?> <?php endwhile; ?> <?php else : ?> <h1> <?php _re('Sorry, no pages matched your criteria.'); ?> </h1> <?php endif; ?> </div>
Forum: Fixing WordPress
In reply to: Wrong featured image linksIt’s not in the index.php. It’s in wp-includes/post-thumbnail-template.php (I found searching for it in a downloaded copy):
<?php /** * WordPress Post Thumbnail Template Functions. * * Support for post thumbnails * Themes function.php must call add_theme_support( 'post-thumbnails' ) to use these. * * @package WordPress * @subpackage Template */ /** * Check if post has an image attached. * * @since 2.9.0 * * @param int $post_id Optional. Post ID. * @return bool Whether post has an image attached. */ function has_post_thumbnail( $post_id = null ) { return (bool) get_post_thumbnail_id( $post_id ); } /** * Retrieve Post Thumbnail ID. * * @since 2.9.0 * * @param int $post_id Optional. Post ID. * @return int */ function get_post_thumbnail_id( $post_id = null ) { $post_id = ( null === $post_id ) ? get_the_ID() : $post_id; return get_post_meta( $post_id, '_thumbnail_id', true ); } /** * Display Post Thumbnail. * * @since 2.9.0 * * @param string|array $size Optional. Image size. Defaults to 'post-thumbnail', which theme sets using set_post_thumbnail_size( $width, $height, $crop_flag );. * @param string|array $attr Optional. Query string or array of attributes. */ function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { echo get_the_post_thumbnail( null, $size, $attr ); } /** * Update cache for thumbnails in the current loop * * @since 3.2.0 * * @param object $wp_query Optional. A WP_Query instance. Defaults to the $wp_query global. */ function update_post_thumbnail_cache( $wp_query = null ) { if ( ! $wp_query ) $wp_query = $GLOBALS['wp_query']; if ( $wp_query->thumbnails_cached ) return; $thumb_ids = array(); foreach ( $wp_query->posts as $post ) { if ( $id = get_post_thumbnail_id( $post->ID ) ) $thumb_ids[] = $id; } if ( ! empty ( $thumb_ids ) ) { _prime_post_caches( $thumb_ids, false, true ); } $wp_query->thumbnails_cached = true; } /** * Retrieve Post Thumbnail. * * @since 2.9.0 * * @param int $post_id Optional. Post ID. * @param string $size Optional. Image size. Defaults to 'post-thumbnail'. * @param string|array $attr Optional. Query string or array of attributes. */ function get_the_post_thumbnail( $post_id = null, $size = 'post-thumbnail', $attr = '' ) { $post_id = ( null === $post_id ) ? get_the_ID() : $post_id; $post_thumbnail_id = get_post_thumbnail_id( $post_id ); /** * Filter the post thumbnail size. * * @since 2.9.0 * * @param string $size The post thumbnail size. */ $size = apply_filters( 'post_thumbnail_size', $size ); if ( $post_thumbnail_id ) { /** * Fires before fetching the post thumbnail HTML. * * Provides "just in time" filtering of all filters in wp_get_attachment_image(). * * @since 2.9.0 * * @param string $post_id The post ID. * @param string $post_thumbnail_id The post thumbnail ID. * @param string $size The post thumbnail size. */ do_action( 'begin_fetch_post_thumbnail_html', $post_id, $post_thumbnail_id, $size ); if ( in_the_loop() ) update_post_thumbnail_cache(); $html = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr ); /** * Fires after fetching the post thumbnail HTML. * * @since 2.9.0 * * @param string $post_id The post ID. * @param string $post_thumbnail_id The post thumbnail ID. * @param string $size The post thumbnail size. */ do_action( 'end_fetch_post_thumbnail_html', $post_id, $post_thumbnail_id, $size ); } else { $html = ''; } /** * Filter the post thumbnail HTML. * * @since 2.9.0 * * @param string $html The post thumbnail HTML. * @param string $post_id The post ID. * @param string $post_thumbnail_id The post thumbnail ID. * @param string $size The post thumbnail size. * @param string $attr Query string of attributes. */ return apply_filters( 'post_thumbnail_html', $html, $post_id, $post_thumbnail_id, $size, $attr ); }