Coder Social home page Coder Social logo

ahmedkaludi / amp-theme-framework Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 34.0 209 KB

Start Creating an AMP theme in minutes - This is a default / boilerplate theme, you can use this, modify and make one your own.

Home Page: https://ampforwp.com/amp-theme-framework/

PHP 100.00%
accelerated-mobile-pages amp framework google-amp mobile wordpress

amp-theme-framework's People

Contributors

ahmedkaludi avatar ajeetku avatar marqas avatar pegazee avatar zabi09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amp-theme-framework's Issues

Documentation

  • Overview

  • Getting Started

  • Theme Structure (Hierarchy)

  • Theme Files
    --[ ] archive.php
    --[ ] footer.php
    --[ ] header.php
    --[ ] index.php
    --[ ] loop.php
    --[ ] page.php
    --[ ] search.php
    --[ ] single.php
    --[ ] style.php

  • Components
    -- [ ] author-box
    -- [ ] call now
    -- [ ] categories-tags
    -- [ ] comments
    -- [ ] featured-image
    -- [ ] logo
    -- [ ] loop
    -- [ ] menu
    -- [ ] post-navigation
    -- [ ] post-pagination
    -- [ ] related-posts
    -- [ ] search
    -- [ ] sidebar
    -- [ ] social-icons

  • Hooks

  • functions

0.1 AMP Theme Framework Release

Release Date: 9th Sep 2017 (Saturday)

  • 0.1 Release Action List #1 (Ajeet)
  • Make sure everything is extendable, Adding Hooks, Making sure old hooks work properly (Marqas)
  • Include the Components into the 0.9.61 core. (Ajeet)
  • Options Panel Restructuring (Azeem)
  • Documentation for AMP Theme Framework (Asif + Ahmed)
  • Testing (Asif + Ahmed)

reduce initial response time

after installing your plugin and woo commerce plugin my initial response time increase upto 4 times i use cache as well but its not working due to this problem after implement AMP in website the site not increse

Featured image for custom front page is not showing!

I was testing amp-theme-framework and very first bug I noticed is that featured image for custom page is not working. For other pages it works

I have found the source of the issue and may be it will help you guys to fix this.

  1. featured-image.php
    Line no - 23

if( true == ampforwp_has_post_thumbnail()){}
// It's always false because of (2) so featured image don't show up.

  1. features.php
    Line no - 10599

if(has_post_thumbnail()){ return true; }
// has_post_thumbnail() is false, somehow global $post is not working here.

workaround

Adding an arg $post_id to the function ampforwp_has_post_thumbnail will fix this.

function ampforwp_has_post_thumbnail($post_id){ global $post, $redux_builder_amp; if(has_post_thumbnail($post_id)){ return true; } ...

Remove action not working

We are trying to remove title action from AMP post template head . Refer to the code below
add_action( 'amp_post_template_head', function() {
remove_action( 'amp_post_template_head', 'affordance_amp_post_template_add_title' );
}, 9 );

Cannot find 404 template

Hi,

I would like too customize the 404 page. But I am not able to find any php file for that.
Also the 404 page doesnot show up.
This is the error I get

This dev.example.com page can’t be found
No webpage was found for the web address: https://dev.example.com/error/amp/
HTTP ERROR 404

AMP Hooks

  • amp_meta

  • amp_css

  • amp_start

  • amp_end

  • amp_sidebar_start

  • amp_sidebar_end

  • amp_before_loop

  • amp_after_loop

  • amp_after_header

  • amp_before_footer

  • Components specific hooks

Get AMP Content

amp_content() is the replacement of the_content() – but what is the replacement for get_the_content()?

I lookup on AMP for WP code and found several references to get_amp_content(), but that function does not work when applied on a theme.

On WordPress I use a function to insert specific code after third paragraph. It's very simple and I need the same on AMP. How can I do it?

<?php
        $paragraphAfter = 3; // display after the X paragraph
        $content = apply_filters('the_content', get_the_content());
        $content = explode("</p>", $content);

        for ($i = 0; $i < count($content); $i++) {
                if ($i == $paragraphAfter) { 
                        echo "<div>Sign up and receive our newsletter!</div>";
                }
                echo $content[$i] . "</p>";
        }
?>

I can't use amp_content() since it prints data on screen, not just gets it.

Relative date renders a wrong translation string

Hello,

in Spanish amp_loop_date() renders a wrong relative date translation. The string "2 years ago" is translated:

"2 años ago"

while it should be:

"hace 2 años"

It is only translating "2 years".

is this a plugin bug or is it caused by my settings?

Thank you.

Options Compatibility List

So the should be compatible with these settings:

1. General

  • Logo
  • Custom Logo Size
  • AMP on Pages

2. Homepage

  • Homepage Support

  • Custom Front Page

  • Blog page

3. Page Builder for AMP

  • Current Page builder with modules

4. Design

  • Search (every design having the different IDs for this)
  • Call Now button
  • Custom CSS
  • Credit link (skipped for now)

5. Single

  • Sticky Social Icons
  • Pagination in Single (Marqas)

6. Advertisement

  • AD 1
  • AD 2
  • AD 3
  • AD 4
  • AD 5
  • AD 6
  • In Advnaced AMP Ads

7. Menu

  • Auto Add AMP in Menu URL

8. SEO

  • Meta Description
  • Additional tags for Head section AMP page
  • Meta Tags from Yoast
  • Yoast Description in ld+json
  • All the Advanced Index & No Index Options

9. Analytics

  • Google Analytics
  • Google Tag Manager
  • Segment Analytics
  • Piwik
  • Quantcast
  • StatCounter
  • EffectiveMeasure
  • ComScore
  • HiStats
  • yandex Metrika
  • Chartbeat

10. Structured Data

  • Default Structured Data Logo
  • Custom Logo Size
  • Default Post Image
  • Default Post Image Width
  • Default Post Image Height

11. Notifications

  • Notifications Support

12. Comments

  • Number of Comments
  • Disqus comments Support
  • Facebook comments Support

13. Hide AMP Bulk Tools

  • Individual AMP Page (Bulk Edit)
  • Select Categories to Hide AMP

14. Advanced Settings

  • Archive page Support
  • Mobile Redirection
  • Link to Non-AMP page in Footer
  • Enter HTML in Header
  • Enter HTML in Footer

New Options Restructuring

These options panel will be divided into Two Primary areas. One is Feature and other one is Design.

Features

Global (TAB)

  • Logo
  • Custom Logo Size
  • SEPARATOR AMP Support mgmt
  • Page Support
  • Homepage Support with custom frontpage
  • Archive page support

Pagebuilder (TAB)

  • On/Off option

Ads (TAB)

  • All Ads options

SEO (TAB)

  • Meta Desc
  • Additional Tags for head
  • SEPARATOR Yoast Settings
  • Meta tags from Yoast
  • Yoast Desc from JSON LD
  • SEPARATOR Index / No Index
  • All the index / noindex pages go here.

Analytics (TAB)

  • Analytics Type
  • Google Tag Manager

Structured Data (TAB)

  • Default SD logo
  • Custom Logo size
  • Default Post Image
  • Default Post Image width
  • Default Post Image height

Notifications (TAB)

  • Notification Text
  • Accept Button text

Contact Form (TAB)

  • CF7 & GF options

Comments (TAB)

  • No of Comments
  • Disqus
  • Facebook Comments

FB Instant Articles (TAB)

  • FBIA Options

Hide AMP bulk tools (TAB)

  • Individual AMP Page (Bulk Edit)
  • Select Category to Hide on AMP

Advanced (TAB)

  • Mobile Redirection
  • Enter HTML in Header
  • Enter HTML in Footer
  • Auto Add /amp in the navigation menus

Translation Manager (TAB)

  • Translation Strings

Design

Themes (TAB)

  • Theme Selection option

Global (TAB)

  • Color Scheme
  • Color Scheme font color
  • Anchor link color
  • Call now button
  • Search
  • Custom CSS

Header (TAB)

  • Non AMP homepage link in the header and logo
  • Make header Unsticky
  • Header Background Color
  • Header Elements Color
  • Menu Show/Hide

Homepage (TAB)

  • Featured Slider
  • Featured Slider Category
  • Override Homepage Thumbnail Size
  • Excerpt Length (when design 1 selected)

Single (TAB)

  • Sticky Social Sharing bar
  • Excerpt
  • Next / Previous Link
  • Show Modified post date
  • Author Bio
  • Date
  • Pagination
  • Related Posts From
  • Number of Related Posts

Footer (TAB)

  • Link to Non-AMP link in Footer
  • Credit Link

Page (TAB)

  • Meta for Pages

Social (TAB)

  • Social Profile Links
  • Social Sharing (Article Single)

Misc (TAB)

  • launch Post builder
  • RTL Support

Components

  • Search

  • Logo / Title

  • Menu (Dropdown support)

  • AMP sidebar

  • Social Icons

  • Loop

  • Single

    • Title
    • Featured Image
    • Page Break support
    • Post Navigation
    • Tags / Category List
    • Author Box
    • Social Sharing
    • Comments
    • Related Post

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.