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, then parse it and look for the desired HTML element.
Related Posts:
- Using Schema with `the_excerpt`
- How to change the markup WordPress inserts for post images
- ajax live search for post title
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Pinterest Integration Using functions.php
- radio button is checked but display not check
- How can you limit srcset on a single type of page?
- Scripts not appending to element in AJAX call – why?
- WordPress Menuing Question :focus
- Remove after images
- Warning: : DOMDocument::loadHTML(): Empty string supplied as input in functions.php when adding classes to post images
- PHP mixed with some JS code to update WordPress theme settings
- Add a unique class to HTML tag/element
- Make wp_link_pages() suitable for Twitter Bootstrap markup
- echo custom fields with AJAX
- The correct way to add a JavaScript in the functions.php [closed]
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- Creating multiple category drop down
- Shortcode of a function
- How do I make a custom “Read More Blogs” button for my blog page
- Images with overlay
- Add schema to Search result page’s body. Tried using is_search
- Some code is added automatically to my site’s header – what is it?
- Automatic add space if user enters number(any digit)
- Sanitize html, where to sanitize
- Remove heading tags on line break
- Print all inline styles to head
- Can’t find function which is called in a wordpress theme
- Function to filter numbers from string
- Save Meta when custom Taxonomy Saves
- Detect Ajax call inside pre_get_posts function
- Show metadata in users.php – wordpress
- Render page with specific id from functions.php
- Add version # to wp_register_style function
- Why should I use get_template_directory() when include files?
- Display Child Pages if no child Exists Display Siblings
- How to remove font awesome from loading in wp theme
- How to show ACF value under post/page title in wp-admin
- How to display an image before title text in menu items
- How to fix Function create_function() is deprecated in / themes
- Block all plug-ins from initiating redirection upon activation?
- Display a list of random terms from custom taxonomy with shortcode
- How do I change where “You must be logged in to comment” directs users?
- Custom route and extract data from slashes and parameter
- Gravity Forms – Custom Merge Tag Convert date_created to Local/WordPress Time?
- How to add custom metakey to shop_order page’s searching function?
- Exclude specific post from query
- wp_set_object_term via js btn frontend
- Is there a function for setting a password to a post?
- Advanced method to control cache of enqueued style/script
- How can I show a specific page to admins only?
- WordPress functions.php conditional include another functions file
- Members only function, but allow account activation [solved]
- Run function with schedule is not working correctly
- How to require a config file in a template and in function.php?
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- the_date() and the_time() functions display actual date an time instead of published date and time
- remove edit link only for published post and pending post
- Adding HTML Code to Replace Text in PHP
- How to add extra value to permalink
- Pass URL to iframe in WordPress Block
- Load templates, pass arguments, and render output from functions.php
- How do I make the comment disappear after deleting from the database?
- Change Page Title
- Bulk updating a group of WordPress Pages every 10 minutes
- How to add if statement on WordPress shortcode output
- How to Not Show posts on Category page?
- Passing function arguments via a shortcode
- Malfunction via Safari [closed]
- How to load a css file depending on the current role
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- localize_script but data changes dependent on product ID
- Auto delete content in specific folder inside media library
- How to change images url in function.php?
- Using get_terms for custom taxonomy in functions.php
- How can I connect to a second database and still be able to use wp functions like get_post_types()?
- Display Script in Header When URL Variable Present
- Redirect to one of two pages after data submitted, depending on the current url
- PHP function for horizontal Woocommerce thumbnails and badges
- Which filter fires upon setting a featured image
- Change category display name function
- Render metabox gallery in frontend
- WordPress wp_dequeue_script remove all other scripts
- Pagination not working – FrontPage
- Changing the HTML of notices in WooCommerce [closed]
- Customizing the wp_video_shortcode output with add_filter
- functions.php pharse error on complete new install
- What is wp_get_post_tags for media tags?
- a SET of wordpress native galleries with title and text?
- Enable accessibility mode in widget as default
- Error in “class-wp-hook.php”
- Fetch ids of live posts only (not posts with other statuses) and change status with a button in candidate dashboard
- Filter works on last selection but no others
- Overwrite text in a complicated filter hook
- How to replace ACTION url from original wordpress login form?
- Add custom css file after plugin css with WordPress Child Theme functions.php
- Redirect User Role When on Specific Page
- WP_Query for Attachments not working as expected
- Undefined variable issue for wp_get_attachment_image_url
- Customise the WordPress gallery html layout