Get and Set Images as Featured with WPeMatico

Updated Aug 2, 2018 Basic instructions for the Free and Pro versions to correctly get images and make featured from the feeds or from source websites with WPeMatico. (This can change for future versions 😉 You can
set an image as featured in a WordPress post if it was previously uploaded and attached to the same post. WPeMatico doesn’t do this with its configuration by default when installing because we don’t want a lot of files starting to be uploaded to our own
Wordpress without control. So, although it is very easy, requires a few steps with configuration settings of the plugin and options inside the campaign.

Upload and set Featured Image

  • First at all, we need a feed with image in every item content. Like the image below. An easy way to see a feed content, is with firefox browser. If you have PRO version and will use Full Content feature, then this step can be ignored because will
    use the content of the source page instead of the item content.

  • Second step consists in setup the plugin for download images to your wordpress website and then attach them to the post that being created.
  • Here you can choice Store images locally (upload), attach images or just Set first image in content as Featured Image like in the image. Over the mouse over the blue info icons in your Settings to get more
    help.

  • Use custom upload is not recommended unless you have problems with standard uploads.
  • If you don’t want to link external images to source site, check: Remove link to source images, then If an image upload gives error, this will delete the ‘src’ attribute of the <img>.
  • As last advise, don’t check Strip HTML Tags if you want to keep the images in content.

Enclosure and media tags in the feed items.

  • Some feeds have no images in content, but have special ‘enclosure’ or ‘media’ tags with links to the images.

media_enclosure

Firefox showing a media enclosure in a feed item.

  • Professional Addon have some extra features like support for enclosures and media images and also others that you can see at the image below.
  • There are special cases that the images have queries variables in the same url of the image, avoiding that WordPress uploads the image. Professional Addon support this by checking Strip the queries variables in images URls. For free version see the filter code below.

  • Also with Professional Addon you can filter images by size and remove them from content by higher or lower size.
  • Another way to strip the special chars from image url and allows to upload is by adding an external filter in your functions.php file. You can copy paste from here below.
add_filter('wpematico_img_src_url', 'myfunction_img_src',10,1 );
function myfunction_img_src($imagen_src_real) {
// Find only image filenames after the / and before the ? sign
	preg_match('/[^/?]+.(?:jp[eg]+|png|bmp|giff?|tiff?)/i', $imagen_src_real, $matches);
// First step of urldecode and sanitize the filename
	$imgname = sanitize_file_name(urldecode(basename($matches[0])));
// Split the name from the extension
	$parts = explode('.', $imgname);
	$name = array_shift($parts);
	$extension = array_pop($parts);
// Join all names splitted by dots
	foreach((array) $parts as $part) {
		$name .= '.' . $part;
	}
// Second step of urldecode and sanitize only the name of the file
	$name = sanitize_title(urldecode($name));
// Join the name with the extension
	$newimgname = dirname($imagen_src_real) . '/' . $name . '.' . $extension;
	return $newimgname;
}

Open Graph, Facebook and Twitter images

Full content Addon has the feature to read from the sources the full content and establishes the og:image url or the Twitter: image if the first fail as featured image.

facebooktwitter_image


WPeMatico FREE & PRO versions 1.2.5.1 released

Since version 1.2 there have been several releases of WPeMatico FREE & PRO plugins, testing the automatic updates and many other new features that were added to the free version and the Premium.

Notable among these are true functions using CURL optionally for obtaining remote files either for full content or images. Testing several alternative methods if any fails.
Better treatment of image names in repeated files is also achieved.
The title links to the source site was broken with new filters added in the last WordPress theme and this was also solved.
Also solve some fields with regular expressions were saved wrong.
Custom filters are added to extend the capabilities of the plugin. So you can modify the file extensions allowed, the names of the images obtained, as well as the fields before inserting the post. (There is an example at the end of this post to remove HTML tags from the titles of the posts.)

Password encryption is added to the Settings page in the case of sending emails using SMTP. But because of this many servers began to treat this file as a hack attempt and erased the file settings_page.php

This was very frustrating as looking plugin security, this file was treated as infectious and deleted without notice in many cases.
To solve this new functions were created to encrypt and decrypt the password. Thus removing false positives given by the antivirus.

In this latest version 1.2.5.1 white screen that was obtained in the Settings page, in smaller versions of PHP 5.4 is solved. This error was taken for a PHP function used in the page that started in the PHP version 5.4 and then was replaced by a custom function.

 


 

In the wordpress support forums they were asked to remove HTML tags that bring the titles of some feed.
https://wordpress.org/support/topic/strip-out-html-tags-in-rss-feed-title

This feature is included in the PRO version, and you can select the option within each campaign. But you can also do with a specific function for new filters added, as follows:

Functions.php file in your wordpress theme, add the following code:

add_filter('wpem_parse_title',  'strip_tags_title',10,1 );
function strip_tags_title($title) {
	$title = strip_tags( htmlspecialchars_decode($title, ENT_QUOTES) );
	return $title;
}

New Addon!! WPeMatico Cache

There are several cache plugins for WordPress but they really have so many options that make your head ache and there is always problems with them. Because of it, we’ve decided to develop an easy plugin, practical and fast, with a good performance and optimized for WpeMatico, so it works extraordinarily with thousands and thousands of posts.

  • We proved a performance till 10 times higher than with other cache plugins.
  • For special cases it can be chosen each post type or individual pages which won’t be included in the cache system.
  • It is optimized for SEO .
  • Not only optimizes the cache in the server, also manages the cache in the browser improving the performance in client-side and server-side.
  • Support HTTP and HTTPS. And also can redirect.
  • Option of two cache types in the site HTML static (Ultra fast) y PHP Files (Accept GET and POST params)
  • And other qualities that you can  I see here.

 

The requirements to use it are the next ones, and before you get it you need to know if your server support it:

  • WebServer Apache.
  • Módulos Apache:mod_rewrite, mod_mime, mod_deflate.
  • PHP superior o igual a la versión 5.3.
  • WordPress.

Read more about WPeMatico Cache

Take advantage of the release offer. Only $29. for a single website! It will last for a bit!

Facebook Finds No Evidence Third-Party Apps Were Hit in Hack

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam elementum maximus nisi, in faucibus odio auctor et. Donec pretium, tortor id bibendum maximus, magna nunc tristique ex, at dapibus turpis ligula sit amet neque. Vestibulum ullamcorper enim lorem. Quisque justo nunc, vulputate dignissim molestie sed, accumsan sagittis lectus. Phasellus vitae pulvinar metus. Fusce non elit vel nisl egestas sodales at vitae massa.

Fusce varius et enim et eleifend. Integer ligula arcu, viverra ac venenatis et, eleifend vitae tellus. Aliquam maximus fringilla neque eu eleifend. Nulla id rutrum quam, ut tincidunt tortor. Praesent accumsan, ex id pretium consectetur, nisi ante placerat magna, sit amet gravida orci risus et dui. Donec porta nulla sapien, vitae ultrices lectus maximus ac. Donec cursus bibendum bibendum. Curabitur leo dolor, faucibus ac mollis sit amet, scelerisque id nunc.

Suspendisse potenti

And the optional caption

Duis mattis arcu ac ipsum maximus, sit amet congue purus egestas. Nunc cursus eget ipsum nec hendrerit. Nullam at pretium metus. Praesent ultricies auctor nulla, efficitur elementum velit tempor et. Sed tellus enim, dapibus sit amet lacinia ac, sodales eget orci. Maecenas sit amet diam ac nulla porttitor tincidunt dapibus nec libero. Integer mattis bibendum augue, id efficitur dolor tincidunt id. Vestibulum libero tellus, commodo sit amet tortor sit amet, aliquam pharetra lorem. Cras faucibus odio est, aliquam condimentum est suscipit at. Aliquam nulla neque, efficitur eu turpis eu, volutpat ultricies ligula. Duis laoreet turpis sapien, vestibulum dapibus urna commodo a. Morbi cursus porta malesuada. Aliquam id tortor ut urna sollicitudin sagittis. Nunc blandit maximus justo, sit amet sodales sem condimentum vitae. Quisque id porta quam. Mauris et turpis magna.

Sed sed eleifend justo, ut pellentesque tellus

And the optional caption

Ut semper efficitur sapien. Duis non neque ac lacus feugiat tempus non in nisi. Cras mollis augue eu nisl aliquam, sit amet congue arcu pellentesque. Integer maximus dui diam, in vehicula ante malesuada nec. Proin nec massa consectetur, vestibulum sapien sed, volutpat sapien. Donec et purus fermentum, venenatis massa id, rhoncus metus. Vestibulum libero tellus, commodo sit amet tortor sit amet, aliquam pharetra lorem. Cras faucibus odio est, aliquam condimentum est suscipit at. Aliquam nulla neque, efficitur eu turpis eu, volutpat ultricies ligula. Duis laoreet turpis sapien, vestibulum dapibus urna commodo a. Morbi cursus porta malesuada. Aliquam id tortor ut urna sollicitudin sagittis. Nunc blandit maximus justo, sit amet sodales sem condimentum vitae. Quisque id porta quam. Mauris et turpis magna.

Duis eget nunc tempor

Lacinia dui id, ornare leo. Morbi gravida fringilla felis, ut accumsan dui vestibulum id. Vivamus eu augue a augue maximus placerat quis quis ligula. Pellentesque at mollis dui. Integer porttitor mauris ut pulvinar condimentum. Quisque orci nisl, auctor vitae consectetur vitae, tincidunt nec ante. Sed congue dui et justo viverra, ac viverra urna luctus.

Nam euismod pulvinar lorem eget imperdiet. Nullam molestie massa at vehicula finibus. Morbi eu luctus felis, vitae volutpat leo. Etiam vitae sapien mollis, dapibus lorem ac, laoreet elit. Nulla commodo, eros a fringilla malesuada, quam nunc accumsan arcu, vitae maximus justo dui ut nibh. Mauris at magna nisl. Suspendisse finibus quam ipsum, ut dapibus diam fermentum ut. Suspendisse non nibh quis nisi molestie dignissim eget in sem.

Praesent non enim placerat enim auctor interdum porttitor sed nisl. Maecenas quam mi, pulvinar vitae tincidunt sed, convallis ac magna. Vestibulum sed lorem congue, elementum magna vel, rhoncus lacus. Integer a neque eu mauris viverra dapibus in quis enim. Ut ac purus purus. Nullam quis magna eu orci facilisis finibus.

Samsung Fans Shouldn’t Bet on a Foldable Phone This Month

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam elementum maximus nisi, in faucibus odio auctor et. Donec pretium, tortor id bibendum maximus, magna nunc tristique ex, at dapibus turpis ligula sit amet neque. Vestibulum ullamcorper enim lorem. Quisque justo nunc, vulputate dignissim molestie sed, accumsan sagittis lectus. Phasellus vitae pulvinar metus. Fusce non elit vel nisl egestas sodales at vitae massa.

Fusce varius et enim et eleifend. Integer ligula arcu, viverra ac venenatis et, eleifend vitae tellus. Aliquam maximus fringilla neque eu eleifend. Nulla id rutrum quam, ut tincidunt tortor. Praesent accumsan, ex id pretium consectetur, nisi ante placerat magna, sit amet gravida orci risus et dui. Donec porta nulla sapien, vitae ultrices lectus maximus ac. Donec cursus bibendum bibendum. Curabitur leo dolor, faucibus ac mollis sit amet, scelerisque id nunc.

Suspendisse potenti

And the optional caption

Duis mattis arcu ac ipsum maximus, sit amet congue purus egestas. Nunc cursus eget ipsum nec hendrerit. Nullam at pretium metus. Praesent ultricies auctor nulla, efficitur elementum velit tempor et. Sed tellus enim, dapibus sit amet lacinia ac, sodales eget orci. Maecenas sit amet diam ac nulla porttitor tincidunt dapibus nec libero. Integer mattis bibendum augue, id efficitur dolor tincidunt id. Vestibulum libero tellus, commodo sit amet tortor sit amet, aliquam pharetra lorem. Cras faucibus odio est, aliquam condimentum est suscipit at. Aliquam nulla neque, efficitur eu turpis eu, volutpat ultricies ligula. Duis laoreet turpis sapien, vestibulum dapibus urna commodo a. Morbi cursus porta malesuada. Aliquam id tortor ut urna sollicitudin sagittis. Nunc blandit maximus justo, sit amet sodales sem condimentum vitae. Quisque id porta quam. Mauris et turpis magna.

Sed sed eleifend justo, ut pellentesque tellus

And the optional caption

Ut semper efficitur sapien. Duis non neque ac lacus feugiat tempus non in nisi. Cras mollis augue eu nisl aliquam, sit amet congue arcu pellentesque. Integer maximus dui diam, in vehicula ante malesuada nec. Proin nec massa consectetur, vestibulum sapien sed, volutpat sapien. Donec et purus fermentum, venenatis massa id, rhoncus metus. Vestibulum libero tellus, commodo sit amet tortor sit amet, aliquam pharetra lorem. Cras faucibus odio est, aliquam condimentum est suscipit at. Aliquam nulla neque, efficitur eu turpis eu, volutpat ultricies ligula. Duis laoreet turpis sapien, vestibulum dapibus urna commodo a. Morbi cursus porta malesuada. Aliquam id tortor ut urna sollicitudin sagittis. Nunc blandit maximus justo, sit amet sodales sem condimentum vitae. Quisque id porta quam. Mauris et turpis magna.

Duis eget nunc tempor

Lacinia dui id, ornare leo. Morbi gravida fringilla felis, ut accumsan dui vestibulum id. Vivamus eu augue a augue maximus placerat quis quis ligula. Pellentesque at mollis dui. Integer porttitor mauris ut pulvinar condimentum. Quisque orci nisl, auctor vitae consectetur vitae, tincidunt nec ante. Sed congue dui et justo viverra, ac viverra urna luctus.

Nam euismod pulvinar lorem eget imperdiet. Nullam molestie massa at vehicula finibus. Morbi eu luctus felis, vitae volutpat leo. Etiam vitae sapien mollis, dapibus lorem ac, laoreet elit. Nulla commodo, eros a fringilla malesuada, quam nunc accumsan arcu, vitae maximus justo dui ut nibh. Mauris at magna nisl. Suspendisse finibus quam ipsum, ut dapibus diam fermentum ut. Suspendisse non nibh quis nisi molestie dignissim eget in sem.

Praesent non enim placerat enim auctor interdum porttitor sed nisl. Maecenas quam mi, pulvinar vitae tincidunt sed, convallis ac magna. Vestibulum sed lorem congue, elementum magna vel, rhoncus lacus. Integer a neque eu mauris viverra dapibus in quis enim. Ut ac purus purus. Nullam quis magna eu orci facilisis finibus.