Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please send us the exported AMP option panel settings? So that we will check
    using it and let you know accordingly.

    For reference here is the doc: https://ampforwp.com/tutorials/article/how-to-import-and-export-the-amp-option-panel-settings/

    Thread Starter jimenezra

    (@jimenezra)

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Thanks for sharing it. Can you please share the active plugins list with the version once? As we tried to re-create it with the shared info we are not able to do. Please share, So that we will check and get back to you immediately.

    Thread Starter jimenezra

    (@jimenezra)

    Hi… here it is:

    Cloudflare
    Versión 4.5.1 | Por Cloudflare, Inc.

    Duo Two-Factor Authentication
    Versión 2.5.7 | Por Duo Security

    Elementor
    Versión 3.4.3 | Por Elementor.com

    GDPR Cookie Consent
    Versión 2.0.5 | Por WebToffee

    Imagify
    Versión 1.10 | Por WP Media

    LiteSpeed Cache
    Versión 4.4 | Por LiteSpeed Technologies

    LuckyWP Table of Contents
    Versión 2.1.4 | Por LuckyWP

    Polylang
    Versión 3.1.1 | Por WP SYNTEX

    Amp para WP : Páginas móviles aceleradas para ẄordPress
    Versión 1.0.77.22 | Por Ahmed Kaludi, Mohammed Kaludi

    Really Simple SSL
    Versión 5.1.0 | Por Really Simple Plugins

    Redirection
    Versión 5.1.3 | Por John Godley

    Reviews and Rating – Google My Business
    Versión 3.40 | Por Noah Hearle, Design Extreme

    Schema & Structured Data for WP & AMP
    Versión 1.9.83.1 | Por Magazine3 |

    Site Kit by Google
    Versión 1.40.0 | Por Google

    Yoast Duplicate Post
    Versión 4.1.2 | Por Enrico Battocchi & Team Yoast

    Yoast SEO
    Versión 17.1 | Por Equipo Yoast

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Maybe due to some priority issue, you are not able to see the year and for testing purposes will you please add priority to the add_shortcode like:

    add_shortcode(‘ampforwp_current_year’, ‘ampforwp_year_shortcode’); to
    add_shortcode(‘ampforwp_current_year’, ‘ampforwp_year_shortcode’, 99);

    You will find the about code in templates/features.php on line – 9609

    https://github.com/ahmedkaludi/accelerated-mobile-pages/blob/494f9c8b9b213a8a872cfcf9946e67a8d905626e/templates/features.php#L9609

    Please add the priority and let us know

    Thread Starter jimenezra

    (@jimenezra)

    Priority added but the same behavior.

    The code was really on line 9589 and was modified to:
    add_shortcode(‘ampforwp_current_year’, ‘ampforwp_year_shortcode’,99);

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Its strange. Can you please follow the below link and let us know if its working or not? So that we will assist you accordingly.

    https://css-tricks.com/snippets/wordpress/year-shortcode/

    Thread Starter jimenezra

    (@jimenezra)

    Not yet.

    – Added the code in functions.php
    – Changed the shortcode to [year] in the traslation panel
    – Cleared all cache

    And the text [year] is visible instead of the value of the current year.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please check once by the below code and let us know back if it works or not? So that we will assist you accordingly to resolve your issue.

    add_shortcode( 'demo_shortcode', 'demo_shortcode_callback_function' );
    function demo_shortcode_callback_function( $atts ){
      return "Welcome to WordPress";
    }

    This creates the [demo_shortcode] that will return the Welcome to WordPress message.

    Thread Starter jimenezra

    (@jimenezra)

    Hi…

    I made some tests and I get aware that both shortcodes [ampforwp_current_year] and [year] work fine OUTSIDE the translation panel

    You can see them working in a section I added called Shortcodes after the conclusions of the posts.

    Thread Starter jimenezra

    (@jimenezra)

    It’s a Polylang plugin compatibility problem.

    When I disabled Polylang… the shortcode works fine.

    • This reply was modified 4 years, 8 months ago by jimenezra.
Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘[ampforwp_current_year] Shortcode now working’ is closed to new replies.