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
- Is there any global functions.php file which works for any theme?
- When should you, and when should you not, use wp_list_pluck()?
- Difference between the_permalink() and get_permalink() function
- Include PHP file in Content using [shortcode]
- How to show product SKU on product page
- Gettext details
- current_cat_ancestor Alternatives
- Roles & capabilities GUI that does not create separate table
- Why get_header() or get_footer() does not run twice if called in the same php file?
- Create thumbnail on PDF upload with Gravity Forms
- How to override filter in child theme?
- Use Exact Image Size using add_image_size
- How can I tell when a user is logged in?
- Enqueue Style in Functions.php
- Different functions file for each site in multisite installation?
- jQuery plugin function is not a function
- Limit posts only on home page – ideally in functions.php
- Make Categories a Dropdown Menu in Media Library
- Loop (iterate) through Multi-Site sub-sites (blogs)?
- Proper way of using functions in action hook?
- How to properly add function called by action-hooked function to functions.php?
- Get Current User info using wp_localize_script, in functions.php
- How to add new embed handler not supported by oembed?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Stuck on maintenance mode
- Not sure if enqueuing js scripts properly
- How to display custom option field in woocommerce orders in admin panel?
- Best practices regarding the creation of custom widgets?
- How to remove style attribute in WordPress RSS output?
- Multiple Loops Meta Data
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- If ACF field is empty show different value [closed]
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- Two functions with different arguments and add_actions, but identical code
- How to fix get_the_category function returning incorrect slug?
- How i can put $_GET codes in function.php?
- Disabling visual editor on a specific post
- Is there a way to direct unregistered user to registration page when click a link?
- Auto log in hook is requiring a page refresh
- Testing for a shortcode using a function. 404 page throwing PHP Notice
- how to get the post ID from wp_insert_post
- How to get post revisions in my custom rest API? [closed]
- Possible to merge these two functions?
- The_content and Preg_replace in loaded Iframe [closed]
- dynamic site link for future migration in echo do_shortcode()
- Hide tab Buddypress profile for visitors, not logged in users
- Add a mature content warning to first-time visitors
- Show Featured Image in else statement
- Function to check if custom page is used by page?
- Simplest Way to Build Custom Archives Page?
- Filter for replacing the WP_query object for a given category
- Custom user role still showing up after deletion, ideas?
- wordpress built-in Jalali date convertor
- Bizarre Child Menu Issue on WP Site
- Google Analytics – add script to functions.php
- Adding new Category does not refresh the backoffice
- Why is style.css not loading through the functions.php
- previous_post_link inside of a function?
- Search and Replace Script Loader in Head Only Works in Footer
- Child Theme functions.php has no effect
- Setting a cookie in functions.php and it gets deleted when working on an other function
- wp_upload_bits – define (sub)folder / (sub)directory before filename?
- Apply height and width for the_content() inside youtube video tag
- Check if excerpt is empty at loop-portfolio
- Add gallery id to rel attribe of wp_get_attachment_link
- get_the_title in edit post_link
- Query is not work
- Screen Options WordPress WYSIWYG
- wp_enqueue_scripts called twice?
- syntax error, unexpected ‘$id’ (T_VARIABLE) – where is the issue though? [closed]
- Parse error: syntax error, unexpected ‘endforeach’ (T_ENDFOREACH) in [closed]
- How can I json_encode the output of my function?