how to check if an element in an html file exists in another html file? [closed]

If I understand you correctly, and you want to find an HTML element inside another page, you need to use some HTML parser. Take a look at https://www.php.net/manual/en/domdocument.loadhtmlfile.php or https://github.com/paquettg/php-html-parser. I believe there are more tools that can help you with this. On page B you load page A as a remote document by URL, … Read more

Add Link to PHP message

Add this Code in your function.php file function mito_login_message( $message ) { if ( empty($message) ){ return “<p><a href=””>hyperlink</a> Please login to continue</strong></p>”; } else { return $message; } } add_filter( ‘login_message’, ‘mito_login_message’ );

Replace only the first CSS class

Not sure if a typo but in your question you say “replace the “thumb-w” CSS class with “thumb-w1” but in your code you have: $html = str_replace( ‘thumb-w’, ‘thumb-w 1’, $html); Should your code instead remove the space and be: str_replace( ‘thumb-w’, ‘thumb-w1’, $html);

Tidy HTML formatting in Gutenberg HTML blocks

Unfortunately, I don’t believe there’s anything available that would allow this unless you do some extensive customization to the block editor. TAB is used very often by users who have limited dexterity (I use it myself) so entering TAB on the keyboard will be used to move to the next element on the page.

dynamic php menu with hidden sub-categories only showing when the category name is clicked

well, I went for a different approach, in this case with radiobuttons. It is working and it is 95% the result desired. <?php $cats = array(array(‘first’, ‘sub-first’, ‘sub-sub-first’), array(‘second’, ‘sub-second’), array(‘third’, ‘sub-third’, ‘sub-sub-third’)); ?> <label>Categorias</label> <?php foreach($cats as $cat): if (isset($cat[0])): ?> <div class=”div1″> <input type=”radio” id=”<?php echo $cat[0] ?>” name=”age” value=”30″> <label for=”<?php echo … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)