Support Michael Martin

Michael Martin

Forum Replies Created

Viewing 12 replies - 121 through 132 (of 132 total)
  • In reply to: Breadcrumbs Query

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Screengrab of my code snippet within WP dashboard:

    https://www.dropbox.com/s/cwswkigzuoysoox/screen-code-snippet.jpg?dl=0

    Original:

    
    /**
     * Rank Math snippet to disable 'contentHasTOC' tests.
     *
     * @param array  $tests Array of tests with score
     * @param string $type  Object type. Can be post, user or term.
     */
    add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
        unset($tests['content-readability']['contentHasTOC']);
     
        $tests['basic']['keywordInMetaDescription']['score'] = 4;
     
        return $tests;
    }, 10, 2 );

    Your new code:

    /**
     * Rank Math snippet to disable 'titleHasNumber' & 'contentHasTOC' tests.
     *
     * @param array  $tests Array of tests with score
     * @param string $type  Object type. Can be post, user or term.
     */
    add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
    	
    	unset($tests['content-readability']['contentHasTOC']);
    
    	$tests['basic']['keywordInMetaDescription']['score'] = 4;
    
        return $tests;
    }, 10, 2 );

    The only change I see is:

    * Rank Math snippet to disable 'contentHasTOC' tests.

    Changes to:

    * Rank Math snippet to disable 'titleHasNumber' & 'contentHasTOC' tests.

    Hi Michael, the code looks identical. The only difference I can see is in the comments. I don’t have a child theme as far as I am aware

    “Use Table of Content to break-down your text” is still visible on a page with a ToC

    Hi Michael,

    Sure, I set up a js file with:

    var coll = document.getElementsByClassName("collapsible");
    var i;
    
    for (i = 0; i < coll.length; i++) {
      coll[i].addEventListener("click", function() {
        this.classList.toggle("active");
        var content = this.nextElementSibling;
        if (content.style.maxHeight){
          content.style.maxHeight = null;
        } else {
          content.style.maxHeight = content.scrollHeight + "px";
        } 
      });
    }  

    And set up the following CSS:

    /*--------------------------------------------------------------
    # Table of Contents
    --------------------------------------------------------------*/
    
    button.collapsible {
    	background-color: #539c22;
    	border: 0;
    	border-top-left-radius: 10px;
    	border-top-right-radius: 10px;
      	color: #ffffff;
      	cursor: pointer;
    	font-family: 'Carrois Gothic', sans-serif;
    	font-size: 20px;
    	line-height: 1.3em;
    	outline: none;
    	padding: 15px 20px;
    	text-align: left;
    	text-transform: uppercase;
    	transition: opacity .3s ease-in-out;
    	-moz-transition: opacity .3s ease-in-out;
      	-o-transition: opacity .3s ease-in-out;
      	-webkit-backface-visibility: hidden;
    	-webkit-transition: opacity .3s ease-in-out;
      	width: 100%;	
    }
    
    .collapsible:hover {
    	opacity: .7;
    }
    
    .collapsible:after {
      	color: #ffffff;
    	content: '\002B';
    	font-size: 36px;
      	float: right;
      	margin-left: 5px;
    }
    
    .active:after {
      	content: "\2212";
    }
    
    ul.content {
    	border-bottom-left-radius: 10px;
    	border-bottom-right-radius: 10px;
    	border-bottom: 1px solid #d0d0d0;
    	border-left: 1px solid #d0d0d0;
    	border-right: 1px solid #d0d0d0;
    	border-top: 0;
    	box-shadow: 0 0 0;
    	margin: 0;
      	max-height: 0;
      	overflow: hidden;
    	padding: 0 20px;
    	text-align: left;
      	transition: max-height .3s ease-out;
    }
    
    li.toc {
    	list-style: square;
    	margin-left: 15px;
    	padding: 10px 0 0 10px;	
    }
    
    ul li.toc:last-child {
        padding-bottom: 10px;
    }

    And HTML on a per page basis:

    <button class="collapsible">Table of Contents</button> 	
                    <ul class="content">
                        <li class="toc"><a href="#1">Large Lazer Etched Boxes made from Reclaimed Wood</a></li>
                        <li class="toc"><a href="#2">Small Lazer Etched Boxes made from Reclaimed Wood</a></li>
    

    I ran the code you posted from the Code Snippets plugin:

    /**
     * Rank Math snippet to disable 'contentHasTOC' tests.
     *
     * @param array  $tests Array of tests with score
     * @param string $type  Object type. Can be post, user or term.
     */
    add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
        unset($tests['content-readability']['contentHasTOC']);
     
        $tests['basic']['keywordInMetaDescription']['score'] = 4;
     
        return $tests;
    }, 10, 2 );

    But I could still see the ToC test within the RankMath area of the page edit

    Hi Todd,

    That is weird. This is a page and this is what I see:

    https://www.dropbox.com/s/xb9ng2iwnkz5x7a/shortcode-screengrab.jpg?dl=0

    It is listed under Product Schema (which I need for the page as it has products of ours on it – I manually set up the schema markup for products on our previous Weebly site for this page, and the other pages, and they all passed validation, so it must be possible to apply schema markup). There is no option to deselect or leave blank:

    https://www.dropbox.com/s/j52vvxk5wmiubdr/shortcode-no-option-screengrab.jpg?dl=0

    I’ve accessed the pastebin link now – must have been a glitch. I created a code snippet with the php given, saved, activated and cleared cache, but for some reason the ToC test still shows up as failing

    Thank you Todd. The ToC code is of my own doing, so no plugin as such. I followed the pastebin link but it gives an Error 502

    Hi Todd, thanks for getting back to me. I set the NoIndex in RankMath this morning. Thank you for the link to redirecting – I’ve had a look at it and it mentions needing to change the .htaccess file. Unfortuanately with my EasyWP package that is not something I am able to do. There is no .htaccess in the root folder and I asked the host namecheap if I can access it, and they said it is not possible. Is there another way or do I need to ask namecheap to sort out the www. redirect (I did write to them previously about this but wasn’t able to get an explanation that made any sense to me – I think they misunderstood what I was asking)

    In reply to: No Connected Website

    It is weird. I’ve been experiencing lots of weird things getting our site up and running! I’m sure there is a fair share of user error there, but sometimes not. Thank you for your help – I can see the site in the Profile now

    In reply to: No Connected Website

    Hi Todd, thanks for getting back to me. Please can you tell me how to go about disconnecting the site? I’m not a long time user – I installed the plugin a couple of weeks back but only activated it the other day after finishing most of the site build.

Viewing 12 replies - 121 through 132 (of 132 total)