Forum Replies Created

Viewing 15 replies - 1 through 15 (of 30 total)
  • Thread Starter Abu Maryam

    (@abu-maryam)

    Hi @mohsinbsf,

    Thank you for your reply. I turned off “File Generation” in the Spectra settings. Unfortunately, it didn’t have any effect. Meaning, the Spectra elements don’t contain the CSS styles (in the frontend) I applied.

    I have to correct the description I gave in my previous post (above). The issue is not occurring in the Listing page. The problem occurs in the Listing template, so on the page were the Listing is designed.

    I hope you can find a solution, otherwise I necessarily have to switch to Elementor, were the problem is not occurring. I prefer to use Gutenberg in combination with Spectra.

    Thanks in advance!

    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hello @swetakumari,

    This will be my last reply on this topic (especially for those who are interested in a workaround). This is my workaround and it works exactly as I wanted:

    The excerpt/content in the Post Grid/Masonry can be controlled by installing the plugin “Advanced Excerpt”. After install, the plugin must be refered to by using this code in the functions.php:

    For Post Grid:

    
    add_filter('uagb_single_post_excerpt_grid', function($excerpt, $id, $attr) { return the_advanced_excerpt() ; },10, 3 );
    

    For Post Masonry:

    
    add_filter('uagb_single_post_excerpt_masonry', function($excerpt, $id, $attr) { return the_advanced_excerpt() ; },10, 3 );
    

    To show the excerpt/content properly, this code must be added in the Additional CSS of the customizer:

    
    .uagb-post-grid .uagb-post__inner-wrap>p {
        display: block;
    }
    

    Your prefered options of the excerpt/content in the Post Grid/Masonry can be controlled in the settings of the plugin Advanced Excerpt. The length of the words/characters can be fully controlled (with retaining the HTML format).

    Anyway, thanks again!
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hello @swetakumari,

    we are almost there I think.
    Using the CSS you have provided, the post content (with HTML format) is fully shown now.
    So that’s really good!

    Unfortunately, what I noticed now is that in the Post Grid/Masonry the option to switch between ‘Show excerpt’ and ‘Show content’ is not working. Now only the full content is shown, regardless which option you select. This due the php code you gave me before.

    I think the Post Grid/Masonry blocks are really powerful blocks, but there are some improvements that need to made:
    – Show excerpt
    – Controling the length of the excerpt
    – Show full content (retaining HTML)
    – Controling the length of the content.

    If you could try to accomplish this in future versions then that would be really great.
    Thanks for your commitment!

    Greetings,
    Abu Maryam.

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hello @swetakumari,

    first of all, sorry for this late reply and thanks for your effort and time!

    I have tried the code you suggested above and it′s not working as I expected.
    With this new code, the YouTube videos are now shown in the Post Grid.
    So that′s really good!

    Unfortunately, if a post does contain text, then this text is not shown in the Post Grid.
    With this new code, only the (YouTube) videos and images are shown in the Post Grid.

    Can you please give it another try in order to show the whole content (including text)?

    Thank you in advance!
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hello @swetakumari,

    You can see the result of the Post Grid and the Post Masonry here on this sample page.

    Some posts on this site contain embeded YouTube video links, but these videos are not shown in the Post Grid and the Post Masonry.

    When posts contain embeded video links from the site library, then these videos are shown properly (see example in link above).
    Hope this explains the the issue.

    Greetings,
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hi,

    after a small adjustment to your code, I found that the code works for all the issues I’ve described when using:

    if ( ! doing_filter( 'the_excerpt' ) ) {
        $text = apply_filters( 'the_content', $text );
    }

    So when using ‘the_excerpt’ instead of ‘the_content’ the php error doesn’t occur anymore and the videos are embeded and shown correctly.

    Maybe this is a helpful addition to our discussion.

    Thanks a lot and this subject can now be considered as really solved!!!

    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hi,

    sorry for getting back again.
    So I told you that the php error after searching an unfound word was fixed by using the code you’ve provided.

    But what I noticed a day later was that the generated excerpt in the UAG post block was not showing embeded YouTube videos from the posts anymore. The YouTube videos are imported in the posts by using a video block. This block uses <figure><div>youtube url-address</figure></div>. Excluding these html tags in “Strip Tag” section of the Advanced Excerpt plugin doesn’t work.

    I don’t know if it’s a good idea to change the code in your upcoming version or even which code is correct without effecting other functionalities.

    At the moment I take the php error (after searching an unfound word) for granted and use the original code in advanced-excerpt/class/advanced-excerpt.php on line 275:

    $text = apply_filters( 'the_content', $text );

    Thanks again for your time!
    Abu Maryam

    • This reply was modified 4 years, 7 months ago by Abu Maryam.
    • This reply was modified 4 years, 7 months ago by Abu Maryam.
    Thread Starter Abu Maryam

    (@abu-maryam)

    Yes!!!
    The code you have provided works great!!!

    Thank you so much for your time and efford!
    Great support!

    Will this piece of code be implemented in a future version of the Advanced Excerpt plugin or is it something only I have to in my own version?

    Thanks again!
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hello,

    I think I found the real problem.
    When installing the Ultimate Addons for Gutenberg plugin and the Advanced Excerpt plugin separately, then the php error does not show up. Also when having them both installed without using the blocks of the UAG plugin, then also no php error.

    The php error is caused when using the post blocks of the UAG plugin AND disabling the excerpt option in those blocks. Blocks like post grid, post masonry and post carousel, which all have the option to enable or disable the excerpt.

    So when disabling the excerpt of these UAG post blocks, then I get the php error. It’s like the Advanced Excerpt plugin is looking for an excerpt in those blocks, but it can’t any excerpt. So it keeps looking untill the php error occurs. When enabling the excerpt of the UAG post blocks, then there is no php error.

    Hope this helps.
    Maybe you can try it out.

    Thanks a lot,
    Abu Maryam

    • This reply was modified 4 years, 8 months ago by Abu Maryam.
    Thread Starter Abu Maryam

    (@abu-maryam)

    Hi,

    Currently I’m using the Astra Pro theme (from Brainstorm Force).
    After changing to the Twenty Twenty theme the problem was still occuring.
    So it was not the theme.

    But I found what caused the problem.
    It was the plugin Ultimate Addons for Gutenberg (also from Brainstorm Force).
    Somehow this plugin interferes with the Advances Excerpt plugin.
    After deactivating the Ultimate Addons for Gutenberg plugin, the problem was gone!

    Can you give it a look and try find out why this happens?

    Thanks a lot!
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hi,

    thanks for your rapid reply and sorry for my late reply.
    This is the php error that occurs as I’ve described:

    ( ! ) Fatal error: Uncaught Error: Maximum function nesting level of '256' reached, aborting! in C:\wamp64\www\wp-includes\functions.php on line 6413
    
    ( ! ) Error: Maximum function nesting level of '256' reached, aborting! in C:\wamp64\www\wp-includes\functions.php on line 6413

    Thanks again!
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Sweta, thanks for your reply.

    As I mentioned, it would be really great to have the option to choose between showing the excerpt or the content. And also to retain the HTML format and to be able to control the count of words.

    Maybe in a future version you can extend the excerpt options in the Post grid and the Post Masonry…

    Today I found a plugin called Advanced Excerpt.
    Works fine for me now.

    Thanks!

    Greetings,
    Abu Maryam

    Hi,

    I had a similar problem after updating Astra to the latest version 2.0.1. My website didn’t resond to some changes I was making. It was like if the website was using older settings stored in cache files.

    On my website I use the plugin “Optimize Database after Deleting Revisions”. I don’t know if the problem was caused due to the use of this plugin, but after deleting the cache files it seems like (for now) everything is working again.

    I don’t know if the caching problem is now solved completely or will accure again. I will have to keep an eye on it.

    Thanks,
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hi Deepak,

    Thanks for your reply.

    I really checked everyting that possibly could relate to post formats.
    On the other hand, (besides the setting in the post itself) there are no special settings I know for showing the different post formats.

    Could you tell me what settings I should look for?

    As I explained in my first message above, when I create a post with a video (embeded) then I set the post format to “video”. The same for a post with an image (set to “image”).

    Looking forward to your helpful reply.

    Regards,
    Abu Maryam

    Thread Starter Abu Maryam

    (@abu-maryam)

    Hi Vrunda,

    the code you have provided WORKS GREAT!!!
    Thank you very much!!!

    There is one thing I noticed about this code:
    – when a post has an embeded video, then the video doesn’t show up in the grid or Masonry. All the other html formats of the post content (like bold text or images) are shown correctly.

    I changed the code a little so the grid/Masonry can also show the embeded videos of the posts.

    CODE:

    add_filter('uagb_single_post_excerpt_grid', function($excerpt, $id, $attr) {
    	return the_content();
    },10, 3 );

    Replace the uagb_single_post_excerpt_grid with uagb_single_post_excerpt_masonry for Masonry.

    Maybe it’s not the correct way, but it works fine.
    Maybe in a future version the UAG-plugin can have also an option to enable/disable show content in the Post grid and Masanry…

    Thanks again!!!
    Abu Maryam

Viewing 15 replies - 1 through 15 (of 30 total)