• Resolved crofrenki

    (@crofrenki)


    Hello,

    I have created a website/webshop: https://instrukcijezasve.hr/ that will allow students/professors in my country (Croatia) to put the adverts about tutoring. The thing is, the adverts are set to index, but the user profiles (which are users themselves) are set as non-index. There is nothing in the Settings to put the Users as indexable.

    Example: https://instrukcijezasve.hr/author/filip/

    Anything we can do about that?

    Best regards,
    Matej

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Matej,

    That’s one beautiful website! The artwork is astonishing.

    Appraisal aside, TSF applies “noindex” to author ‘archives’ with 0 posts attached.
    I added a little filter to bypass that restriction conditionally. In your case, the following snippet should do well:

    add_filter(
    	'the_seo_framework_enable_noindex_no_posts',
    	function( $noindex ) {
    
    		if ( is_author() ) {
    			// To allow indexing, so set noindex to false.
    			$noindex = false;
    		}
    
    		return $noindex;
    	}
    );

    You may also want to remove the Autor: prefix in the title, or change it to something else. Let me know, and I can share with you another filter snippet.

    Have a lovely day!

    P.S. I see you added “nofollow” and “noarchive” to the author pages. Is this intentional?

    • This reply was modified 2 years ago by Sybre Waaijer. Reason: P.S
    Thread Starter crofrenki

    (@crofrenki)

    Hello Sybre,

    Thank you so much for the compliments! We are all working hard on this project! And thank you for the effort of writing a snippet for me.

    Unfortunately, it didn’t work because those Authors are actually Users. They have some “weird” connections within the plugin we’re using. The thing is, I have activated your snippet and it is not showing that the author/user is indexable. Any chance we can index the users? (I know that is rare, but that would help a lot).

    SS: https://i.imgur.com/JyQTUL4.png
    URL: https://instrukcijezasve.hr/author/filip/

    Yes, can you please help me out with that Autor: in the title?

    And no, I did not add that. Can we get rid of that, please?

    Thank you!

    Thread Starter crofrenki

    (@crofrenki)

    Also, just another update. I’ve managed to edit these:

    Hope it helps.

    Thank you!

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    Author pages are the same for users and authors in WordPress. Have you tried the snippet I sent you?

    (Where to place filters?)

    To remove the Autor: part, please use this snippet:

    add_filter(
    	'the_seo_framework_use_archive_prefix',
    	function( $use, $term ) {
    		if ( $term instanceof \WP_User )
    			return false;
    
    		return $use;
    	},
    	10,
    	2
    );

    Cheers ??

    Thread Starter crofrenki

    (@crofrenki)

    Hello Sybre,

    Yes! It worked now because I have used the hook plugins_loaded in the WPCodeBox pluginu. It was not set as that before!

    Both works now! Thank you so much!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Indexing of users’ is closed to new replies.