Edit your function to accept a parameter, e.g. function modell_nach_personenzahl( $value ) {
Edit your meta query to accept this parameter, e.g. 'value' => $value
Then register a bunch of shortcodes:
for ( $i = 1; $i <= 7; $i++ ) {
add_shortcode( "shortcode-name-{$i}", function() use ( $i ) {
modell_nach_personenzahl( $i );
} );
}
Then just use [shortcode-name-1]
, [shortcode-name-2]
, etc.
Related Posts:
- Problem with extract() with custom shortcode
- Pass Shortcode Attribute to footer Script
- Use a shortcode to display custom meta box contents
- Wp-query Order By problem
- Shortcode to insert default text and change one word throughout it?
- How To Show Shortcodes In WordPress Custom Fields?
- Shortcode to eliminate and replace with
- restrict access to specific urls on a specific period of time
- Add multiple custom fields to the general settings page
- Is it possible to remove the “standard” post format?
- Issue with get_theme_mod returning a blank value instead of the saved value
- How to remove row-actions from pages table?
- Modify search function in WordPress (TwentyTwelve)
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- How to fix a theme with page.php Default Template that accidentally deleted?
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- how to create shortcode in wordpress
- Formatting post content to exclude gallery
- Remove images from get_the_excerpt
- How do I change parameters without changing the core
- Using locate-template & shortcodes doesn’t appear to work
- add sidebar area to header of child theme
- Displaying a random user with a shortcode
- Function to show only first instance of shortcode
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- creating shortcode to pull json array
- adding custom classes for tables
- Display gallery on top before content
- List child pages of specific page using shortcode
- wp_dropdown_categories and custom attribute
- get_post_type() in in_array doesn’t work for some reason
- Automatically wrap multiple images in div
- Ajax not working properly
- create shortcode to list users with specific meta key value
- Variable if post is sticky in functions.php
- Include default functions and methods
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- How can I modify all existing tags while keeping the urls themselves?
- Unable to login using username
- Custom shortcodes not inserting into visual composer columns
- Setting youtube size in functions.php
- Adding a colorbutton in tinymce dialog with current api
- Excerpts are not displayed by a shortcode on category pages
- shortcode help require
- Optimizing a WordPress site
- different style sheet for just one page template
- Condition OR for current user ID
- wp_nonce_field is breaking form for reasons unknown
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- Where do I store custom functions that call custom page template files?
- Using multiple line variable inside a function?
- Echoing function into WordPress NextGen gallery
- How to echo the value of an array element using a function via a shortcode
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- login_headertitle is deprecated since version 5.2.0
- How to include any template using Shortcode fuction?
- Different favicon on different pages
- Need to convert image url to a Base_64 data url with wordpress function..
- Shortcode question
- Problem with images URL after filter applying
- Shortcode to get featured image of specific id post
- Modify shortcode to work with custom post types
- shorthand syntax for custom fields
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- loginout function customization
- show all the posts thumbnails
- implementing a centralized content “show-do-not-show” toggle?
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- Display a list of random terms from custom taxonomy with shortcode
- Load templates, pass arguments, and render output from functions.php
- Probleme shortcode with list author
- CF7 select value get to function and reciept value from function
- Shortcode to output category description by passing ID
- Help using ShortCodes to style whole chunks of the post
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- Woocommerce custom calculation function
- WordPress Ajaxifying not working properly
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Replace image attributes for lazyload plugin on image elements with specific class
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- Custom shortcode with do_shortcode and substr
- WordPress shortcode Issue!
- Expanding a function to call a plugin or show a link
- Trying to the deduce shortcode from a function
- Pull random comment from specific post, display on homepage with shortcode
- Set thumbnail from URL, by grabbing image in functions.php
- functions.php / replacing div’s with new ones?
- Run function from parent on child site
- Gallery Shortcode Function Help
- Post variables not displaying correctly in custom function
- Echo custom field value in shortcode function
- PHP error in shortcode [closed]
- WP Custom tables query
- WordPress Custom wp mail template return full template
- post_row_actions filter from parent theme not executing in child theme