Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #730842

    Hi,

    Whilst checking through various pages on a site I’m rebuilding, I did a quick search for ‘author’ in the page source, to see what bots can see. I found my admin username displayed on posts despite having deselected the various fields in enfold to hide it. The problem doesn’t seem to exist on pages. It seems to relate to your itemscope, and it is outputting my admin username for all to see. I know the data isn’t shown on-page, but this output, just the same as anything simply hidden with css, is there for bots with malicious intent to find and use.

    I have already deleted a block of code from loop-index.php, which I thought would resolve the issue, but it doesn’t.

    What I can see is this:

    <footer class="entry-footer"></footer><div class='post_delimiter' style='border-color:#ffffff !important;' ></div></div>
    <span class='hidden'>
    <span class='av-structured-data'  itemscope="itemscope" itemtype="https://schema.org/ImageObject"  itemprop='image'>
    <span itemprop='url' >mydomainstuff/uploads/2016/12/singletheme-2.jpg</span>
    <span itemprop='height' >172</span>
    <span itemprop='width' >440</span>
    </span><span class='av-structured-data'  itemprop="publisher" itemtype="https://schema.org/Organization" itemscope="itemscope" >
    >>>>>>>>> here >>>>>>>>>>		<span itemprop='name'>xxxxxMYxxxADMINxxxUSERNAMExxx</span>
    <span itemprop='logo' itemscope itemtype='http://schema.org/ImageObject'>

    This is really undesirable, so how do I either overwrite the admin user details shown (xxxxxMYxxxADMINxxxUSERNAMExxx) or just remove them from display? I saw another post (May 2016) about this prior to writing this ticket but didn’t see a solution, as the guy posting had fixed it himself.

    Many thanks.

    • This topic was modified 7 years, 10 months ago by brian7454. Reason: typo
    #730867

    I have partially resolved this by creating a fake user/contributor and reassigning something like 1200 custom posts to that name but it’s a short-term solution as it means I need to remember not to post as admin, which is silly and I’m also likely to forget.

    I don’t know if I missed it before, or if the difference is a result of me attributing posts to a contributor, but the username is shown twice, not once. The output spans are below:

    <span class='av-structured-data'  itemprop="publisher" itemtype="https://schema.org/Organization" itemscope="itemscope" >
    <span itemprop='name'>xxx-USERNAME-xxx</span>
    
    <span class='av-structured-data'  itemprop="author" itemscope="itemscope" itemtype="https://schema.org/Person" >
    <span itemprop='name'>xxx-USERNAME-xxx</span>

    Hope this helps.

    #731844

    Hi,

    Thank you for using Enfold.

    Please edit the includes > helper-markup.php file then remove this code around line 344:

    		if( !in_array('publisher', $exclude) )
    		{
    			$output .= "<span class='av-structured-data' {$publisher_markup}>
    				<span itemprop='name'>{$author_name}</span>
    				<span itemprop='logo' itemscope itemtype='http://schema.org/ImageObject'>
    				   <span itemprop='url'>{$logo_url}</span>
    				 </span>
    			  </span>";
    		}
    
    		if( !in_array('author', $exclude) )
    		{	  
    			$output .= "<span class='av-structured-data' {$author_markup}><span itemprop='name'>{$author_name}</span></span>";
    		}

    Best regards,
    Ismael

    #963174

    Hi,

    I would like to ask whether this code won’t be overridden by a new version of the Enfold theme when the file is in the /wp-content/themes/enfold/includes/ a not in enfold-child folder?

    Thanks.

    #963334

    Hi mjakubicek,

    It will be overwritten by the update, basically the theme updates replaces all files in the enfold folder.
    So if you want to retain the changes, please add it to the child theme. :)

    Best regards,
    Nikko

    #964080

    So it means to create the folder /includes/ in the folder /enfold-child/ and then create the file helper-markup.php with the code above. Am I sure that the folder structure must be preserved in the child folder too or just only create helper-markup.php in /enfold-child/?

    Thank you for your clarifying.

    #964414

    Hi mjakubicek,

    Thanks for telling us which file you’re trying to overwrite, usually you will need to use the same structure for example includes/loop-index.php overwrites its parent theme file.
    However it doesn’t work for helper-markup.php (I have tested this). In that file there are two functions avia_markup_helper and av_blog_entry_markup_helper just copy the function which you want to overwrite without the:

    if(!function_exists('function_name'))

    and paste it to the functions.php of your child theme and modify it.
    Hope this helps :)

    Best regards,
    Nikko

    #964729

    Thank you!

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