Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Tbar

    (@tbar_uk)

    Thanks for your response Marqas – great support.

    Thread Starter Tbar

    (@tbar_uk)

    Unfortunately when I do that it doesn’t work at all – maybe it’s the Divi theme? It defaults to Divi pages despite “Use This Content as AMP Content is selected” for that page.

    To explain further: The url with /amp does show the amp content, so it does work, but when visited by a mobile phone it defaults to the Divi page. So, the detection of the mobile phone is not working in order to redirect to the amp content.

    Replaced Divi theme with a skeleton template – same problem when navigating to website. Amp pages are simply not being recognised by a mobile device, full content is delivered not the amp content despite amp content being activated for that page. I am assuming that this is normal? That amp content is recognised then delivered via Google etc?

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

    Thanks Roquefort – great plugin.

    It appears off the bat to fix it but I haven’t ran with the fix for any length of time as yet. Please let me know how you get on with it. If you need any help let me know here.

    While you’re there you may want to change the doc to open in another tab on the browser. Update line 1953 to:

    '<li id="doc-attachment-%d"><span class="doc-attachment-mime-icon doc-attachment-mime-%s"></span><a href="%s" title="%s" target="_blank">%s</a>%s</li>',

    Try the following. In an editor go to line 1934 of the file: templates.php in the includes dir.

    Paste in:

    // BUGFIX: URL without / as attachment link.
          $attachment_url = str_replace("bp-attachments", "bp-attachments/", $attachment_url);

    It goes just before the IF statement… as follows:

    $attachment_filename = basename( $attachment_url );
    	// BUGFIX: URL without / as attachment link.
    	$attachment_url = str_replace("bp-attachments", "bp-attachments/", $attachment_url);
    
    	if ( 'full' === $format ) {
    		$attachment_delete_html = '';

    This will fix the link problem.

    Getting the same myself WP3.8. May look at trying to change the url via htaccess. Should be possible, rewriting the string to inlcude a trailing /.

    It effectively makes ALL attachments useless at the moment. I think this is a very useful feature so will take a look at the code… I may be some time.

    The problem is your webserver sees the directory but forbids you to list its contents. It must have a file to open like index.html

    Simply create a file called .htaccess in your root directory or edit the one already there if there is one (the full stop before the filename is important). Place the following content in the file before saving:

    DirectoryIndex index.html

    You should now be able to browse your site as when a directory is served up index.html will be appended.

    Hope it solves it for you.

Viewing 8 replies - 1 through 8 (of 8 total)