Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Constantin Flux

    (@constantflux)

    I just moved from yoast to RankMath and it seems to be working.

    @geoffrey25
    I looked through your sitemap and noticed that whenever you use wpbakery as content block, none of the images you used in that block appear in the sitemap.
    I’m currently troubleshooting my website for this exact problem and it seems like yoast and wpbakery breaks yoast sitemaping in this regard.
    This results in seo downranking due to thin pages.

    Thread Starter Constantin Flux

    (@constantflux)

    Hey Arnaud,
    I’m switching back and forth while troubleshooting. If you want to see the ticket I wrote to the theme developers of the theme I’m using check out the link below. you will find the solution MathRank community came up with and a link to yoast github and a hook somebody developed to solve this.
    https://laborator.ticksy.com/ticket/2703141

    The problem is that I can’t simply switch to AIOSEO from yoast without losing everything I set up in yoast, or can I and then reverse back to yoast if required?
    Please advise.

    Edit: the folks over at the theme developing support have set my topic to private for the moment. So I’ll just post my links here:

    I found this thread on github: https://github.com/Yoast/wordpress-seo/issues/4808
    In this thread people discuss that theme developers can implement a viable solution for this problem by using this code or some variation of it:
    https://hookr.io/filters/wpseo_sitemap_urlimages/
    Apparently this involves theme developers or end users use “wpseo_sitemap_urlimages” to create dynamic filters for images in page builders content blocks.

    Also… this is the code (to be attached to the child themes functions.php) the support over at RankMath, that had the same problem, came up with to remedy this incompatibility between RankMath and wpbakery. Unfortunately I’m not proficient enough to adjust it for use with yoast:

    add_filter( 'rank_math/sitemap/urlimages', function( $images, $id ){    if ( empty( $images ) ) {        $post = get_post( $id );        if ( $post && strpos( $post->post_content, '[vc_row' ) !== false ) {            preg_match_all( '/(?:image|images|ids|include)="([^"]+)"/', $post->post_content, $matches );            foreach ( $matches[1] as $m ) {                $ids = explode( ',', $m );                foreach ( $ids as $id ) {                    if ( (int) $id ) {                        $images[] = array(                            'src' => wp_get_attachment_url( $id ),                            'title' => get_the_title( $id ),                        );                    }                }            }        }    }
        return $images;
    }, 10, 2 );

    This last bit of code requires the end user to always manually list every image that appears in page builder blocks on every single page/post/portfolio to inject it into the sitemap. This, in my opinion, is not feasible and impractical.

    • This reply was modified 3 years, 9 months ago by Constantin Flux. Reason: additional information and typos
    • This reply was modified 3 years, 9 months ago by Constantin Flux. Reason: added info
    • This reply was modified 3 years, 9 months ago by Constantin Flux. Reason: additional information and typos
    Thread Starter Constantin Flux

    (@constantflux)

    So people seem to have had an issue with RankMath and WP Bakery as well and they solved it together with RankMath:
    https://notasusual.co/rank-math-wpbakery-sitemap-fix/

    Specifically with this code:

    add_filter( 'rank_math/sitemap/urlimages', function( $images, $id ){
        if ( empty( $images ) ) {
            $post = get_post( $id );
            if ( $post && strpos( $post->post_content, '[vc_row' ) !== false ) {
                preg_match_all( '/(?:image|images|ids|include)\=\"([^\"]+)\"/', $post->post_content, $matches );
                foreach ( $matches[1] as $m ) {
                    $ids = explode( ',', $m );
                    foreach ( $ids as $id ) {
                        if ( (int) $id ) {
                            $images[] = array(
                                'src' => wp_get_attachment_url( $id ),
                                'title' => get_the_title( $id ),
                            );
                        }
                    }
                }
            }
        }
    
        return $images;
    }, 10, 2 );

    If you look at this, can you see if this is a fix that would work with yoast as well and if so, how could I set this up?
    Is the what you mean by “add them via a filter”? The solution for the problem with WP Bakery and RankMath was solved by attaching the code at the end of the functions.php. No need to manually include images from each post/page/potfolio item that doesn’t work.

    @pieterkmo Do you know of an alternative for sticky sidebar menus? Thanks!

    Thread Starter Constantin Flux

    (@constantflux)

    Oh my. I’m terribly sorry. I just rechecked the other plug-in and it seems I was mistaken. What I saw was my caption, which was the same as my alt image tags that I set up on IG. I mixed this up and I’m terribly sorry for this.

    Does IG allow for access to the first comment in the API?
    If so, you could put an option to pull the first comment as ALT text. This would be practical for huge IG accounts, since they get a first comment from a third party very quickly. But for small IG accounts it often is no problem to make a first comment before somebody else makes one. I usually put all the hashtags in the first comment.

    Anyway, sorry again for the inconvenience. ):

    Thread Starter Constantin Flux

    (@constantflux)

    Thanks! I disabled replies, saved, checked the page and it is showing the recent tweets now. I reenabled replies and it still shows the newest tweets. Lets see if it sticks.
    If it doesn’t, I’m going to exclude replies again and keep them disabled.
    Yes, I’m using the W3 total cache plug-in.
    Thanks again!

    Thread Starter Constantin Flux

    (@constantflux)

    Oh! Apparently I do not understand how Chrome displays html. In the elements tab I see

    <style type="text/css" id="aoatfcss" media="all">.yadda {yadda: yaddayadda}</style>
    <noscript id="aonoscrcss"><link type="text/css" media="all" href="https://www.constantinflux.com/wp-content/cache/autoptimize/css/autoptimize_d8983d0ab554a08b590e37b8f6173bdc.css" rel="stylesheet"/></noscript>
    <link rel="stylesheet" type="text/css" href="https://www.constantinflux.com/wp-content/cache/autoptimize/css/autoptimize_d8983d0ab554a08b590e37b8f6173bdc.css" media="all">
    <title>Constantin Flux Fotograf | Fotografie am Niederrhein</title>

    but when I view ‘source’ I see what you see. My apologies.
    I can’t say that I understand that the position of the autoptimize.css is displayed where it is in the elements tab though.
    Am I correct to assume that it shows the deferred .css in the position it is rendered?
    And this means something is calling for styles and the browser is using the deferred .css to find the missing style?
    And my next step would be to find what exactly is missing from the inline css and put it there so the browser stops looking in the deferred .css, correct?

    Do you know of a clever way to use chromes dev tools to find out when this happens and what exactly it is?

    Thread Starter Constantin Flux

    (@constantflux)

    Ok… now I trashed AtF for now since the combination of both plug-ins wasn’t working out in the end.

    Still stuck on the Autoptimize issue though.
    Autoptimize is putting a link to the complete .css in my pages head right after my critical path css and in front of the noscript tag that is calling it for the deferred function at the bottom of the page.
    Even when I take the css from the .css file Autoptimize puts in my page head and put it through the critical path generator, extracting the critical css from that and entering it via inline and defer, the exact same css is still called in the pages head right after the noscript tag where the same .css file is linked.

    In this video I can see the inline critical path css the author put in, after that the noscript tag including the .css file link (which gets relevant at the end of the page, if I understand correctly) but nothing after that.
    It is behaving differently for me on my page (link here if you want to check out my wip).

    I’m puzzled.

    Thread Starter Constantin Flux

    (@constantflux)

    Thanks! I solved it trying various combinations of settings and combining Autoptimize with Above the Fold.
    Don’t ask me why, but I was able to solve the blocking notification from PageSpeed by using Above the Fold for critical css injection instead of Autoptimize. Everything else is switched off in AtF and the only thing I switched off in Autoptimize is Inline and Defer and put whole css inline.
    Still trying to solve the FOUC I get with several pages of my site by excluding them from optimization. I can do that with Autoptimize, correct?
    Happy holidays, Frank.

Viewing 10 replies - 1 through 10 (of 10 total)