Forum Replies Created

Viewing 15 replies - 541 through 555 (of 588 total)
  • Thread Starter frenchomatic

    (@frenchomatic)

    Better if there was a remove action applied to a hook.

    Thread Starter frenchomatic

    (@frenchomatic)

    Excellent news.

    It is going to be tricky to separate a static home page and a page which is used for posts if they are being used on the same site. The only way I could find to do it was to test the url to see if it was the root domain url.

    I look forward to seeing how it turns out

    5 stars on there way.

    Thread Starter frenchomatic

    (@frenchomatic)

    This is how I am currently overcoming the issue – it serves my purpose on posts, pages, the blog posts page (I also test for page number and add it in for page 2,3, … ) and tag archives (I don’t bother with $paged as my tags only apply to pages and not posts).

    It is not a nice solution and as mentioned above – really this should be done by the core plugin.

    /**
    * Getting Genesis SEO into AMP pages
    */

    add_action( ‘amp_post_template_head’, ‘amp_post_template_metatitle’,2);
    function amp_post_template_metatitle() {

    // tag pages
    global $wp;
    $current_url = home_url(add_query_arg(array(),$wp->request));

    if(is_tag()){

    remove_filter( ‘get_the_archive_title’, ‘ampforwp_editable_archvies_title’,10 );
    remove_action( ‘amp_post_template_head’, ‘amp_post_template_add_title’ );

    echo ‘<title>’;
    echo genesis_default_title();
    echo ‘</title>’;
    }
    // blog page

    elseif(is_home()){
    remove_action(‘amp_post_template_head’,’ampforwp_frontpage_title_markup’);
    echo ‘<title>’;
    echo genesis_default_title();
    echo ‘</title>’;
    }

    // posts and pages
    else{
    remove_action( ‘amp_post_template_head’, ‘amp_post_template_add_title’ );
    remove_action(‘amp_post_template_head’,’ampforwp_meta_description’);
    remove_action(‘amp_post_template_head’,’ampforwp_frontpage_title_markup’);
    echo ‘<title>’;
    echo genesis_default_title();
    echo ‘</title>’;
    }

    if($current_url==’https://www.example.com/amp&#8217;){
    remove_action(‘amp_post_template_head’,’ampforwp_frontpage_title_markup’);
    echo ‘<title>’;
    echo ‘Dentist – Lakewood, White Rock & Lake Highlands’;
    echo ‘</title>’;
    $description = ‘Your local dental practice, serving patients from across East Dallas. For an appointment with Kelli Slate, DDS – Please call (214) 821-8639.’;
    echo ‘<meta name=”description” content=”‘ . esc_attr( $description ) . ‘” />’ . “\n”;
    }

    $description = genesis_get_seo_meta_description();

    $description = genesis_get_seo_meta_description();

    // Add the description if one exists.
    if ( $description && $paged > 1 ) {
    echo ‘<meta name=”description” content=”‘ . esc_attr( $description ) . ‘- page ‘ . $paged . ‘” />’ . “\n”;
    }
    elseif( $description) {
    echo ‘<meta name=”description” content=”‘ . esc_attr( $description ) . ‘” />’ . “\n”;
    }
    }

    I am getting the same issue. Are you using the genesis framework by chance? There are also problems with the meta data if you are using genesis. I have some of it solved but not all of it.

    • This reply was modified 7 years, 4 months ago by frenchomatic.
    Thread Starter frenchomatic

    (@frenchomatic)

    So this works in archive.php of the design being used (here it is design2)

    $image_alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true); // ADD LINE
    
    				?>
    				<div class="home-post_image">
    					<a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>">
    						<amp-img
    							src=<?php echo $thumb_url ?> alt="<?php echo $image_alt;?>" //AND HERE
    							<?php if( $redux_builder_amp['ampforwp-homepage-posts-image-modify-size'] ) { ?>
    								width=<?php global $redux_builder_amp; echo $redux_builder_amp['ampforwp-homepage-posts-design-1-2-width'] ?>
    								height=<?php global $redux_builder_amp; echo $redux_builder_amp['ampforwp-homepage-posts-design-1-2-height'] ?>
    							<?php } else { ?>
    								width=100
    								height=75
    							<?php } ?>
    						></amp-img>
    • This reply was modified 7 years, 4 months ago by frenchomatic.
    Thread Starter frenchomatic

    (@frenchomatic)

    Seems the only way to make it go away is to set the dropdwon to GA but fill nothing in.

    The major issue is with those that disable the REST API. That is basically anyone who cares about closing loopholes to hackers. There are very good reasons in terms of security to disable it via htaccess or if your security plugin does it as an option. Tens of blog posts by all the security companies make is pretty clear. It is a hackers dream to find the REST API open to them – they can really give your site a work over using it. I think if you don’t move away from using the REST API and in this way, your plugin will fade away which is a real shame. Many people don’t realize but they probably get more robot hacker traffic than they do real visitors – install something like Ninja firewall which is free and then watch the logs of how many blocks the firewall has to make. It is a real eye opener.

    Several posts with solution to this – use version CF 4.7 . Don’t be tempted to allow access to the REST API – there are very good reasons to block it if you don’t want to get hacked.

    Downgraded to CF version 4.7 and all is well.

    Downgraded to CF version 4.7 and all appears well.

    Rebuilding permalinks is unlikely to work if you are blocking the REST API -anybody that has a reasonable firewall like Ninja Firewall will either need to downgrade and test or disable that option in their firewall plugin. Likewise anybody who has an htaccesss rule blocking it. This type of thing should have been spotted before release. There are tens of security articles about exploits on the REST API.

    Confirmed WordPress V4.8 and latest contact form 7 V4.8- blocking the Rest API either through htaccess or via a plugin like Ninja firewall means the form will not send and eventually runs to a time out. Allowing the REST API and json to be accessed is a major security issue. If your site gets attention you will be hacked – odds on. This really needs fixing quickly.

    Thread Starter frenchomatic

    (@frenchomatic)

    This is what I mean

    I presume what I am trying to get without it unsticking the x-defaults is correct?

    <link rel=”alternate” href=”https://www.mydomain.com/mypage/&#8221; hreflang=”en”/>
    <link rel=”alternate” href=”https://www.mydomain.fr/monpage/&#8221; hreflang=”fr”/>
    <link rel=”alternate” href=”https://www.mydomain.com/mypage/&#8221; hreflang=”x-defaults”/>

    What happens after I modify or re-save a page is this

    <link rel=”alternate” href=”https://www.mydomain.com/mypage/&#8221; hreflang=”en”/>
    <link rel=”alternate” href=”https://www.mydomain.fr/monpage/&#8221; hreflang=”fr”/>

    I hadn’t noticed it before until i looked at the source code.

    • This reply was modified 7 years, 7 months ago by frenchomatic.

    Add line-height:20px or 25px to the css selector .varients-title. You can add it into the plugin file amp-woocommerce.php or better still start to build up a custom style sheet in your theme’s functions.php file for amp product pages.

    I am hoping that the plugin developer provides a box in a future release so that custom css can be added into override the default settings.

    Thread Starter frenchomatic

    (@frenchomatic)

    Would it be possible to use forms instead to display variants in the same way as it does on a regular woocommerce product page? This would actually be the ideal solution as opposed to buttons. Buttons work fine for a few variants but when there are many, a dropdown form for each attribute works best for users.

    https://www.ampproject.org/docs/reference/components/dynamic/amp-form

Viewing 15 replies - 541 through 555 (of 588 total)