• Resolved taifunorkan

    (@taifunorkan)


    How can I preserve class-attributes on my page?

    I installed Feedzy Plugin in wordpress and added this hook to my theme’s function.php to get the html content into my page.

    /** Hook 2019-09-23 Feedzy Plugin (RSS Feeds)
     * Keep HTML in feed items content
     * https://docs.themeisle.com/article/542-how-to-keep-html-in-feed-items-content
     */
    add_action( 'init', 'feedzy_summary_input_remove', 99 );
    function feedzy_summary_input_remove() {
    	remove_filter('feedzy_summary_input', array( Feedzy_Rss_Feeds::instance()->get_admin(), 'feedzy_summary_input_filter' ), 9);
    }

    In the rss feed (see above) there is a image tag with class attribute:
    <a href='https://[...]' target='_blank'><img class="btn" src="https://www.schnipp-schnapp-schnappi.de/used-guitars/images/Right_Now_108x45.gif" border="0" alt="Jetzt bei Ebay: Gibson SJ-200 Masterpiece Eigener Wein Harvey Leach Akustische Gitarre J-200" /></a>

    But in the sourcecode of my wordpress website the class “btn” does not show up.
    <img class=" lazyloaded" src="https://www.schnipp-schnapp-schnappi.de/used-guitars/images/Right_Now_108x45.gif" data-src="https://www.schnipp-schnapp-schnappi.de/used-guitars/images/Right_Now_108x45.gif" border="0" alt="Jetzt bei Ebay: Gibson SJ-200 Masterpiece Eigener Wein Harvey Leach Akustische Gitarre J-200">

    I need this class for styling the button. Thank you for your assistance!

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan I’m curious to know why why you are removing the feedzy_summary_input filter. Also, feedzy does not add any image with class btn – it could be something to do with your theme.

    Thread Starter taifunorkan

    (@taifunorkan)

    Thanks for your reply.

    I deleted the hook, you mentioned, in functions.php. But I am still using:

    /** Hook 2019-09-22 Feedzy Plugin (RSS Feeds)
     * Keep HTML in content
     * https://docs.themeisle.com/article/942-in-feedzy-how-do-i#keep-html-in-content
     */
    
    add_filter( 'feedzy_summary_output', 'feedzy_summary_output', 10, 4 );
        function feedzy_summary_output( $contentSummary, $newLink, $feedURL, $item ) {
            return $item->get_content();
        }

    As a result I get:
    <img class=" ls-is-cached lazyloaded" src="https://www.schnipp-schnapp-schnappi.de/used-guitars/images/Right_Now_108x45.gif" data-src="https://www.schnipp-schnapp-schnappi.de/used-guitars/images/Right_Now_108x45.gif" border="0" alt="Jetzt bei Ebay: Aeon Edition 2 Premium mit Koffer">

    But I am still missing the class-attribute ‘btn’ in the sourcecode of the rendered page.

    I do not mean feedzy adding a class. But in my feed image is with class ‘btn’. Feedzy or my theme has removed class from the image tag.

    <![CDATA[



    ]]>

    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan to confirm that its not your theme that is removing the class, can you please test with the default WP theme? Please also provide the complete shortcode you have used so that we can try to reproduce this at our end.

    Thread Starter taifunorkan

    (@taifunorkan)

    @rozroz I now changed for testing to twenty nineteen teem, but the result is the same with the rss-feed (https://schnipp-schnapp-schnappi.de/used-guitars/rss.xml.php?category%5B%5D=33021&category%5B%5D=119544) I get for my image

    <img class="prev" src='https://i.ebayimg.com/00/s/MTYwMFgxMjAw/z/FUsAAOSwAV5dM08t/$_1.JPG' border='0' title='Sennheiser MKH 40 P48 Kondensator Mikrofon Microphone' />

    but at the preview page of twenty nineteen theme there is

    <img class=" lazyloaded" src="https://i.ebayimg.com/00/s/MTYwMFgxMjAw/z/8m8AAOSwlkFdWqsm/%24_1.JPG" data-src="https://i.ebayimg.com/00/s/MTYwMFgxMjAw/z/8m8AAOSwlkFdWqsm/%24_1.JPG" border="0" title="Justin Westerngitarre 6-saitig inkl Tasche, leicht defekt">

    In this case the class “prev” was removed. Why?

    I would appreciate further assistance.

    Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan Can you make sure you have no other plugins active? Please share a link to the page where the shortcode has been used so that we can understand what exactly you are trying to do.

    Thread Starter taifunorkan

    (@taifunorkan)

    Dear @rozroz,
    I am sorry not to be able to provide a link to the page because it is just a test page on my PC on localhost. The access is restricted.
    I don’t think there is a conflict with some other plugins.

    I had these active Plugins running:
    Autoptimize
    Duplicate Post Page Menu & Custom Post Type
    Mesmerize Companion
    Yoast SEO

    I copied this shortcode into my page:
    [feedzy-rss feeds="https://schnipp-schnapp-schnappi.de/used-guitars/rss.xml.php?auction=1" max="30" feed_title="no" thumb="no" refresh="2_hours" sort="date_asc" meta="yes" summary="yes" summarylength="200"]

    After deactivating all plugins and changing theme to default there is no better situation concerning the class-Attribute from the rss-feed’s content.

    In the html sourcecode of the wordpress page the class=”fav” image attribute is still missing:
    <img src="https://i.ebayimg.com/00/s/Njc1WDkwMA==/z/YtcAAOSwWrNcB4TL/%24_1.JPG" border="0" />

    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan sorry, can’t provide more assistance without a page that we can view. Let me know when you have that ready.

    Thread Starter taifunorkan

    (@taifunorkan)

    Okay, I installed your plugin on another project.
    https://schnipp-schnapp-schnappi.de/wordpress/621-2/

    For my purposes it is essential to have some possibilitiy to style a image.

    Still, there is image class= “prev” in the xml-file (1).
    But no in the rendered page (2):

    Examples:
    (1)
    <img class="prev" src='https://i.ebayimg.com/00/s/MTIwMFgxNjAw/z/mzYAAOSwSA5dl15R/$_1.JPG' border='0' title='Jazzgitarre Akustigitarre &quot;The Loar&quot; mit Koffer' />

    (2)
    <img src="https://i.ebayimg.com/00/s/MTIwMFgxNjAw/z/mzYAAOSwSA5dl15R/%24_1.JPG" border="0" title="Jazzgitarre Akustigitarre &quot;The Loar&quot; mit Koffer">

    • This reply was modified 5 years, 5 months ago by taifunorkan.
    Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan I don’t see any prev in the feed.

    Thread Starter taifunorkan

    (@taifunorkan)

    @rozroz. Thank you again.

    Maybe you were looking in a different feed, I mentioned before.

    I am talking of this feed: https://schnipp-schnapp-schnappi.de/used-guitars/rss.xml.php?category%5B%5D=33021&category%5B%5D=119544 used on the page https://schnipp-schnapp-schnappi.de/wordpress/wp-admin/post.php?post=621

    Here is the neckline of the feed:

    		<td> 
    			<a href= 'https://rover.ebay.com/rover/1/707-53477-19255-0/1?ff3=2&toolid=10044&campid=5337963632&customid=schnappi1&lgeo=1&vectorid=229487&item=333352614111' target='_blank'>
    			<img class="prev" src='https://i.ebayimg.com/00/s/MTIyNFgxMjI0/z/v~gAAOSwPc1dmtHb/$_1.JPG' border='0' title='Marma Jazzgitarre ca. 1960 Markneukirchen' />
    			</a>
    		</td>

    Please search for ‘prev’. Tell me when you’ve found it.

    Thank you for your patience.

    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan if your intent is to style the image, you don’t need the prev or any other class defined in the XML. If you are conversant with CSS, you can do it by referring to the image under rss_content viz. .rss_content img

    Thread Starter taifunorkan

    (@taifunorkan)

    Okay @rozroz, but what would you do, if the feed had more than one image in its html content???

    Maybe a product-image and an image, such as “right now on ebay” image;

    And how to style these images different. I want to implement a zoom effect on the product image?

    Why stripping image class attributes at all?

    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    • This reply was modified 5 years, 5 months ago by taifunorkan.
    Plugin Contributor contactashish13

    (@rozroz)

    @taifunorkan using CSS you can address the first or the nth image. Unfortunately, we cannot provide you custom code – you can easily search for such code samples on any search engine.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Feedzy Light: no html class attribute shown on page’ is closed to new replies.