Solution that I’ve found:
$pages = get_pages();
$pattern = get_shortcode_regex();
foreach($pages as $page) {
if ( preg_match_all( "https://wordpress.stackexchange.com/". $pattern .'/s', $page->post_content, $matches )
&& array_key_exists( 2, $matches )
&& in_array( 'my_shortcode', $matches[2] ) )
{
echo $page->post_title . <br />;
}
}
Related Posts:
- PHP Deprecated: Non-static method should not be called statically
- Adding Custom Fields for Img in Posts
- How To Ignore a Filter On Applying Filter the Content In a Function
- Calling function from within functions.php returns unwanted value
- shortcode doesn’t work
- Can’t get custom posts of taxonomy to show
- Shortcode to generate and save password in a file
- get shortcode value
- Storing Options in a Shortcode
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- How to put JQuery/Ajax inside shortcode?
- WordPress Shortcode to get URL Parameters $_GET[‘name’] redirects for no reason at all
- WordPress function not being called from jQuery method
- Nested shortcode functions accessing variable
- Some code in shortcode function being ignored
- How to Create a shortcode to this php function
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- Custom shortcode for displaying user based on a role parameter
- Return multiple values in a shortcode attribute
- Is there a way to convert shortcodes to html content?
- Shortcode not working – quotes seems strange
- Add the_post_thumbnail_url to a shortcode in function.php
- Echo out element to another page.
- Adding a Tag Parameter / Filter to My Shortcode
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- How to get current cart values using WC_Shortcodes?
- get_post_meta shortcode returns empty field
- How do I use a plugin’s shortcode attribute value in another function?
- Why does my custom plugin only function correctly once per page?
- Hide content for specific users with id
- Why is my shortcode not working?
- Get Shortcode output to database for static post_content
- Query Shortcode from a multisite to appear on a different site?
- Find all strings between an enclosing shortcode
- Posting code inside the post instead of in the template file using shortcode
- How to Set Limit with WordPress Get Bookmarks Shortcode
- Creating Features List in WordPress Post
- Integrate Razorpay quick payments plugin with contact form7 plugin
- cURL External API request displays content above other content on page
- Subtract Using GravityWP Count Plugin
- How to get URL param for pagination in shortcode?
- qTranslate‑X is not translating all shortcodes
- Should all plugins be encapsulated in a Class?
- PHP code on Visual Composer Plugin
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- Trying to disable plugins doens’t work
- Thumb rating for wordpress – top user
- Have Plugin Handle Specific URLs
- Layout shop page: resize images and columns
- How to add inline css/js inside a shortcode
- Shortcode in AJAX popup
- How do you remove plugin edit option?
- Where should I save an API key of my user when installing my plugin?
- Accessing post’s meta data based on user’s click of a post
- How to add equivalent of php include to one page (as plugin?)
- Allow users of my plugin to define their own shortcode rather than use mine?
- Shrink down register_settings on Settings API
- How to call WordPress function other files
- Removing an action from wp_footer called in a class that’s inside a bigger class
- Where are theme codes located for WordPress?
- Inserting custom PHP script on homepage
- Add bcc to contact from on wordpress
- wp_enqueue_scripts
- WordPress Console Application (ability to excecute a custom function via crontab only)
- Form Plugin for Api Requests which is used via Shortcode
- “Allowed memory size” problem [closed]
- eaccelerator PHP error
- Looking for a good way to include php code in posts, but using special include markup rather than direct php code
- Show prices with tax Inclusive in Minicart widget
- Custom fields not showing up in the user info (PaidMembershipsPro)
- Remove a div class with condition
- Problem with checked box on wp car manager plugin
- Hooking into the HTML header container
- PHP Error message Upload images to remote server
- No route was found matching the URL and request method
- WP_get_image_editor resizing images in a foreach loop
- my hook or my function wont run in the cronjob
- CMB2 Output Select Box Chosen Option
- Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
- WordPress Admin sub-level menu issue
- Passing ajax variable to more than one wordpress plugin function
- Add class as plugin for other plugins
- Saving custom form fields
- Template from scratch: Sidebars not showing widget
- Contact Form 7: custom validation [closed]
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- How to add homepage Widget?
- Embedding BitBucket Code in Posting
- Do shortcodes affect page indexing by search engines?
- What can I do to customize a widget provided with this plugin? from where have I to start?
- Shortcode inside a redirect [closed]
- Attachement title in wpallimport
- Block registration with viewScript
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- I want create woocommerec match products columns
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress