Add Feedly featured image class "webfeedsFeaturedVisual" to featured images in Wordpress - php

I would like to customize the way Feedly presents my website's RSS Feed (here), which is actually very poorly displayed.
I followed their instructions adding all the suggested markups; this way I managed to have the correct title, description, icon, logo, cover image, accent color and everything else.
However, in the abovementioned guide it's said that in order to have Feedly pick the correct featured image you have to add a webfeedsFeaturedVisual classname. How can I do that with all my featured images?
Thank you in advance. Regards.

If you are looking to add a class to your featured image:
Edit the reference to call the featured image in your template:
<?php the_post_thumbnail('post-thumbnail', array( 'class' => "zoomer-class attachment-post-thumbnail")); ?>
Change zoomer-class to your own class name.
More info here:
https://wordpress.org/support/topic/featured-image-add-image-class?replies=4
Hope it helps!

Actually I managed to let Feedly show the featured image through a plugin.
Thanks for your help.

Related

Mapping pictures in CSS PHP?

I have a plugin which is importing some products. But the problem is that the plugin only supports "gallery pictures". This is the reason why you don't see any title picture:
https://gamekeys-shop.de/produkt/battlefield-1/
Is there a way to map the gallery picture to the title picture with CSS?
Or is there another way?
Furthermore it would be very good if I can also delete the link from the gallery picture so that I have only one outgoing link and not two if the gallery picture is mapped to the title picture.
Is there a way to do this?
Greetings and Thank You!

WordPress - Use first image in post as featured image - for past posts?

there are a few solutions and plugins out there that take the first image which is used in a post as featured image.
I need to do that for all the posts which have been in the past. I do not want to open 700 posts and update each of them. Most of the solutions out there only get going when a post has been updated.
Does anybody know how I can add the first image in a post as featured image for past posts automatically?
Thanks
i think This Plugin solve your problem
https://wordpress.org/plugins/post-featured-image-generator

Get images out of product description in phtml file

as the title might let you suggest I have trouble to get image URL's out of product descriptions in my custom phtml file (located in template folder).
In cms pages/blocks you can use
{{media url="wysywig/Banner/image.jpg"}}
which we do for parts (headlines) of our product descriptions.
Now when I try to display that description out of my phtml file with
<?php echo nl2br($productResult[$i]->getDescription()); ?>
the description gets loaded but the image URL's dont get converted to total
URL's like for example "/media/wysywig/banner".
I know that you have to use Mage::getUrl("media") in php/phtml files though this information doesn't help much in my situation.
The only idea I have is to set a string function to search for
{{media url="wysywig/banner/image.jpg"}}
and replace it with
Mage::getUrl("media/wysywig/image.jpg")
but I kinda feel like this isn't a very elegant solution.
Or is it the only way? Any help is appreciated.
Much thanks and greetings mpfmon
It doesn't work because it was not planned for the product description to have such media call:
{{media url="wysywig/Banner/image.jpg"}}
However there is nothing wrong doing this, to make it work, you have to filter your description with a widget function:
echo Mage::getSingleton('widget/template_filter')->filter($description);
You must enable "Allow Dynamic Media URLs in Products and Categories" setting in Catalog section of Magento configuration screen. (See attached image)

NextGen Gallery: Display title in the gallery

I want to display the title in the NextGen gallery. The plugin does not offer an option for that, so I have to somehow go past it, and modify the code.
NextGen Version:2.0.33.
Has anyone got across the same problem? How can I solve it?
Stefan - The view folder is in the modules/ngglegacy folder. New version I guess.
As for the gallery title, I modified some code I found here,
http://psychopixi.com/tech/how-to-link-back-to-an-album-in-a-nextgen-gallery/
It's actually for showing breadcrumbs and providing a back button, but if you change the values of the iterators myi and myi2 in lines 10 and 13 it will just output with the title, which you can format as you wish.
As per their suggestion I used the plugin Shortcode Exec PHP to make shortcode which I then placed in my gallery page. You can then place the shortcode for your gallery after.
It's not an elegant solution, and it assumes that the url of your gallery has the name of the gallery in it.
Good luck.
<?php echo $gallery->title ?>
Place this in your gallery template file wherever it's needed.
I found a solution to this problem having searched all day on inet.
Your 'view' folder is in the ngglegacy folder of the plugin. You can add <?php echo $gallery->title ?> to that file. Then goto Gallery options in your admin area and select gallery.php to show for the Basic Thumbnails.
thats it!

Wordpress - Change image in article but keep attributes

like the topic says: Is there a way to change an image in an existing wordpress article while keeping all the defined attriutes for that image like description and so on? Maybe a plugin?
Best Regards,
Stephan S.
The plugin Enable Media Replace should do what you are looking for.
I just tested the plugin Enable Media Replace (as suggested by emartel), and it seems that it now also updates posts that include the affected image or use it as a featured image.
The preview (just after uploading) still shows the old image, but later in the library it seems to get replaced and it seems to work.

Categories