Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #734391

    I noticed a couple of my test pages have been appearing in Google recently.
    But they are not linked from any page or any menu.
    Note I’ve also disabled all feeds.

    Could they be coming from the theme somewhere?

    How is Google finding them?

    #734579

    Hey Alan,

    If you publish pages they will be found by search engines, it doesn’t matter if they are not linked from menus etc.

    Best regards,
    Rikard

    #737837

    Thanks Rikard

    But do you know specifically how the search engines are finding these pages?

    It just doesn’t make sense if they’re not in a menu or feed…

    #737842

    Hey!

    Please add following code to functions.php file in Appearance > Editor

    
    add_filter('avf_set_follow','avia_set_nofollow');
    function avia_set_nofollow(){
    if(is_page(array(59,79))){
    $meta = '<meta name="robots" content="noindex, follow" />' . "\n";
    }
    return $meta;
    }

    This will hide page with ID 59 and 79 from Google. You can replace the page ID’s with your pages to hide them from Google.

    Regards,
    Yigit

    #737896

    Ahhh, haaa! :D

    From your code, does that mean it was Avia that was leaking the info?

    #737900

    Hey!

    No actually. Through a filter our framework has, we are just able to allow or to not allow search engines from indexing your site manually :)

    Cheers!
    Yigit

    #1496430

    Enfold seems to bypass my custom 404 page when author names are queried.

    And it’s your 404 page (not the one I created) that reveals a list of all published pages.

    Note, this doesn’t happen when using a default theme, e.g. Twenty Twenty-Five.

    As soon as I switch back to Enfold the problem persists.

    • This reply was modified 1 week, 6 days ago by themeacco.
    #1496432

    Hi,

    Thanks for the update. I’m not sure that I fully understand what you are looking to achieve. You don’t want search engines to find the pages that you have published?

    Best regards,
    Rikard

    #1496433

    Yeah I realize that sounds kind of silly…let me instead rephrase the question:

    In Enfold’s Theme Options I have specified my own Custom 404 Page.

    Yet, visits to mydomain.com/?author trigger a different kind of 404 Page.

    This 404 Page seems to be generated by Enfold (which provides a list of all my pages).

    1. Why is my Custom 404 that I specified in Enfold not kicking in? See Private Content for URL
    2. Where is this 404 Page coming from?
    3. And how can I edit it?

    #1496437

    Hi,

    Thanks for the update. The page that you linked to is not a 404 page, it’s actually using the blog template and it’s returning an empty query.

    Best regards,
    Rikard

    #1496450

    1. Is there a way to force Enfold to use my Custom 404 page when a query returns no results?

    2. Is there a way to force Enfold to use my Custom 404 page when a query does returns results?
    My website is basically a portfolio website, and therefore there is no need for any user to query anything

    Lastly, please take a look at my private content…

    3. Are there any other URL patterns or query types I may have missed?

    #1496451

    Hi,

    Thank you for the update.

    To handle all those URL patterns, you can add the following to your child theme’s functions.php. This covers both cases — empty query results and valid archive/query pages that you don’t want accessible:

    
    add_action( 'template_redirect', function() {
        if (
            ( is_author() || is_attachment() || is_post_type_archive() || is_tax() || is_category() || is_tag() ) &&
            ! have_posts()
        ) {
            global $wp_query;
            $wp_query->set_404();
            status_header( 404 );
            nocache_headers();
            include( get_404_template() );
            exit;
        }
    } );
    

    This will redirect all the content listing URLs, category URLs and feed endpoints you listed to your custom 404 page. It covers author, attachment, post type archive, taxonomy, category and tag routes.

    Let us know how it goes.

    Best regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.