Forum Replies Created

Viewing 15 replies - 46 through 60 (of 184 total)
  • Hi,

    Solution 1:

    Add this line in your wp-config.php:

    define('WP_MEMORY_LIMIT', '256M');

    Solution 2:

    Add this line of code in you .htaccess file:

    php_value memory_limit 256M

    Solution 3:

    (This solution Only if you have Dedicated Server/ VPS )
    Create a file info.php containing the following:

    <?php
    phpinfo();
    
    ?>

    Now display that file on your website and look for php.ini locations and try to add the following code to it:

    memory_limit = 256M ; Maximum amount of memory a script may consume (64MB)

    Upload it to your website ftp and display it on your browser

    Hello,

    Uninstall Wp Super Cache it’s a very simple task that won’t you more than 2 mins check this out: https://www.bloggingglobal.com/completely-uninstall-wp-super-cache-plugin/

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

    enter your ftp and rename folder: WordPress/MyBlog/wp-content/plugins/ and find a folder named: wordpress-23-related-posts-plugin/ and rename it to wordpress-23-related-posts-plugin-bak

    Same here I had to disable it manually.

    3.6.2
    Ownership change

    Why would they make that update that was not even tested!!

    Thread Starter mcfreder

    (@mcfreder)

    Thank you so much for the huge update! Everything is working fine, except the featured Image. It seems like this code:
    get_post_meta(get_the_ID(), 'thumbnail', TRUE);

    Is the only code that displays the custom field for me sadly. I recommend you to let the user set his own custom field in the admin panel with this code above, or choose auto. My website is a newspaper, and I tend to preserve my photo quality. I still have no idea why your code doesn’t work for, maybe because I use News Cherry theme.

    Anyways, I just wanted to share my output and I hope it would be useful for a further development of this plugin.

    Thank you so much again! And as always outstanding amp plugim ever!!

    Thread Starter mcfreder

    (@mcfreder)

    You need to go to the plugin folder> Under ‘templates’ folder, find index.php

    And find the following:

    <?php if ( has_post_thumbnail() ) { ?>
    				<?php
    				$thumb_id = get_post_thumbnail_id();
    				$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);
    				$thumb_url = $thumb_url_array[0];            
    				?> 
    				<div class="home-post_image"><a href="<?php the_permalink(); ?>"><amp-img src=<?php echo $thumb_url ?> width=100 height=75></amp-img></a></div>
    			<?php } ?>

    Replace it with:

    				<div class="home-post_image"><a href="<?php the_permalink(); ?>"><amp-img src="<?php echo get_post_meta(get_the_ID(), 'thumbnail', TRUE); ?>" width="100" height="75"></amp-img></a></div>
    

    thumbnail is your custom field name used to feature your image.

    I took a look at your website, and it appears that you are using custom pages to feature your content. It looks like that your homepage only has this: https://image.prntscr.com/image/42e142866f1242279f00f6e64cb88f39.png

    So, if you would like to display that on your amp homepage. I recommend you to open up edit index.php again:

    <?php if ( have_posts() ) :
    		while ( have_posts() ) : the_post(); ?>
    
    		<div class="amp-wp-content">
    			<?php if ( has_post_thumbnail() ) { ?>
    				<?php
    				$thumb_id = get_post_thumbnail_id();
    				$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);
    				$thumb_url = $thumb_url_array[0];            
    				?> 
    				<div class="home-post_image"><a href="<?php the_permalink(); ?>"><amp-img src=<?php echo $thumb_url ?> width=100 height=75></amp-img></a></div>
    			<?php } ?>
    
    			<div class="amp-wp-post-content">
    
    				<h2 class="amp-wp-title"> <a href="<?php the_permalink();?>"> <?php the_title(); ?></a></h2>
    
    				<?php $content = get_the_content();?>
    		        <p><?php echo wp_trim_words( $content , '15' ); ?></p>
    
    		    </div>
    		    <div class="cb"></div>
    
    		</div>
    
    	<?php endwhile;  ?>

    Replace all that code with the following customized code:

    <div dir="rtl" class="amp-wp-content">
    
    				
    				<div class="home-post_image"><amp-img src="https://johnbaconsalon.com/wp-content/themes/natural/lib/timthumb.php?src=/wp-content/uploads/JB-Salon-Diamond-with-tag_370x181.png&w=370&h=0&zc=1" width="100" height="75"></amp-img></div>
    
    			<div class="amp-wp-post-content">
    
    				<h2 class="amp-wp-title">John Bacon Salon</h2>
    
    				
    		        <p>Established in September of 1988 John Bacon Salon had one goal in mind, the pursuit of excellence. 20 years later we are proud to continue to achieve our goal. Come visit John Bacon Salon and realize our commitment to be your reward.</p>
    
    		    </div>
    		    <div class="cb"></div>
    
    		</div>

    You can certainly customize this code above and even add more stuff on the home page, but please make sure to use basic html tags, more info here: https://www.ampproject.org/docs/get_started/create/basic_markup.html

    Good luck,

    Good job Guys!!

    You are welcome guys! I made youtube/flash object video stripping tag to amp friendly if you would like me to share it too.

    In the plugin folder:

    wp-content\plugins\accelerated-mobile-pages\themes\default

    Open up header.php and underneath <head> add the following script:

    <script async custom-element="amp-audio" src="https://cdn.ampproject.org/v0/amp-audio-0.1.js"></script>

    Open up functions.php and add this code under // Strip the styles:

    // amp_audio https://www.ampproject.org/docs/reference/extended/amp-audio.html
    function amp_audio($content) {
    $src2 = preg_match('/<audio\b[^>]*>(.*?)<\/audio>/is', $content, $resultz);
    preg_match('/<source(.*)src(.*)=(.*)"(.*)"/U', $resultz[1], $result);
    $amp_audio = array_pop($result);
    $amp_audio = str_replace("?_=1", "", $amp_audio);
    $replace = '<amp-audio width="400" height="300" src="'."$amp_audio".'">
    <div fallback>
     <p>Your browser doesn’t support HTML5 audio</p>
    </div>
      <source type="audio/mpeg" src="foo.mp3">
      <source type="audio/ogg" src="foo.ogg">
    </amp-audio>';
    
    $content = preg_replace('#<audio .*?>(.*?)</audio>#i', $replace, $content);
        return $content;
    }
    add_filter('the_content','amp_audio', 20 );

    This code will automatically solve Issue #1a (this code should replace any audio player that has <audio></audio> tag with the amp friendly tag: https://www.ampproject.org/docs/reference/extended/amp-audio.html

    Concerning Issue #1b

    In the same file “functions.php” look for :

    // amp_iframe_tag will convert all the iframe tags and will change it to amp-iframe to make it AMP compatible.
    function amp_iframe_tag($content) {
        $replace = array (
            '<iframe' => '<amp-iframe',
            '</iframe>' => '</amp-iframe>'
        );
        $content = strtr($content, $replace);
        return $content;
    }
    add_filter('the_content','amp_iframe_tag', 20 );

    replace it with:

    // amp_iframe https://www.ampproject.org/docs/reference/extended/amp-iframe.html
    function amp_iframe($content) {
    $amp_iframe = preg_match( '#<iframe .*?>(.*?)#i', $content, $matchery );
    $amp_iframe = preg_match( '@src="([^"]+)"@' , $matchery[0], $matcher );
    
    $replace = '<amp-iframe width=300 height=300
        sandbox="allow-scripts allow-same-origin"
        layout="responsive"
        frameborder="0"
        src="'."$matcher[1]".'">
    </amp-iframe>';
    $content = preg_replace('#<iframe .*?>(.*?)</iframe>#i', $replace, $content);
        return $content;
    }
    add_filter('the_content','amp_iframe', 20 );

    and don’t forget to also add this script to the header.php under <head>:

    <script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>

    Thread Starter mcfreder

    (@mcfreder)

    omg! Thank you! This has been so far an excellent experience!

    Thread Starter mcfreder

    (@mcfreder)

    Thank you so much for your feedback and introducing ads!!

    You guys seems to have done an excellent job with this plugin. I have just activate it again.

    I will rate and submit a review after I check again if i can fix webmaster tools errors.

    Thank you a bunch <3

    @maria858 The malware is installed in the fifteen theme: https://i.imgur.com/VGVWzE3.png

    I high recommend you to remove the entire theme folder: /wp-content/themes/fifteen/

    I would also recommend to rename your plugins folder : /wp-content/plugins TO /wp-content/plugins-old and create an empty plugins folder and start installing the plugins fresh again from the wordpress plugins search directory.

    Finally, check your main theme js files for a malware that is exactly like this: https://pastebin.com/jEg9EbYM

    In case you find your js infected with that code simply remove that chunk of code and you are done.

    After you have all this, request a new scan in quttera. If there is no malware congrats, but now you need to tell google that you have removed the malware, and to do that is quite simple, follow the steps: https://support.google.com/webmasters/answer/168328?hl=en

    GL

    Hi,

    I solve the bug in wp_option / siteurl, but it doesn’t solve for a long time.

    If the url keeps changing though you fix it. Then It might be a malware or backdoor on your website. Scan your server is highly recommened with clamav or check locations where potentionally the virus is located in: wp-content/themes OR wp-content/plugins OR wp-config.php OR .htaccess OR index.php.

    The most tricky folders are “themes” and “plugins” You might need to rename them and add new folders with the same names. I have had pretty much the same problem, just that .htaccess used to changed instead of wp_option.

    Here are a couple of website scanner I recommend you to use for scanning your website before you proceed with any of the steps above:

    https://quttera.com/website-malware-scanner
    https://sitecheck.sucuri.net/

    I hope that will be of any help.

    Good Luck,

    Forum: Fixing WordPress
    In reply to: Admin login

    Add this line to your wp-config.php

    define('FORCE_SSL_ADMIN', true);

    In your .htaccess file, bellow “RewriteEngine on” add the following lines:

    RewriteCond %{HTTP_HOST} ^yoursite.com [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
    RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301,NC]

    Hi,

    Just access your admin panel @: yourwebsite.com/wp-admin/options-general.php

    edit there your personal title and description > Update and it’s done

    If you have forgotten your password, you can simply reset it through ftp: https://codex.www.ads-software.com/Resetting_Your_Password#Through_FTP

Viewing 15 replies - 46 through 60 (of 184 total)