Since the wp_brands
is your own custom table, I would recommend passing the brand the user clicks on via Query String:
http://example.com/your/permalink/?brand=xyz
You can access this via PHP in your page template(not the wp-admin editor) like this:
$_GET['brand'];
Once you have that you can use whichever brand the user chose to query the database. This isn’t the “WordPress” way of doing things, but it will solve the issue.
Related Posts:
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Displaying Logged-In User Name in WordPress Menu
- Change the filename format of saved featured images
- Getting the comment number relative to all the post’s comments
- How do I add a php statement to a jQuery string
- Upload images and attachments from frontend form
- Config apple-app-site-association file with wordpress
- How to use the php if statement [closed]
- lazy load comments wordpress on click
- Use Filename for Alt and Title Tags
- Should I use wp_mail or PHP’s mail? [duplicate]
- Trying to use Ternary operators with WP Conditionals
- How can one utilize a variable as a callback function name for add_settings_field
- Filter link to existing content suggestion
- Generate an array of parent/child page IDs, based on parent page name
- Link to file in plugin directory from wordpress template?
- Using a switch statement in WordPress
- wp_handle_upload – The uploaded file could not be moved to wp-content/uploads/2012/09
- Why is this Ajax not working?
- Trying to make php run in a post
- Pass PHP variable to JavaScript without inline JS
- Stumped on migration
- WordPress Site Running Extremely Slow on Dedicated Server
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- Where to edit the template that is generating the code for dynamic_sidebar left-sidebar in the Understrap theme? [closed]
- Append HTML Using Shortcode
- Get rid of this Strict Standards warning [closed]
- Custom search results page not working with empty search
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- Use DOMDocument with ob_start breaks my HTML code
- Tax query in pre_get_posts not working
- how to fix error “called incorrectly, should not be accessed directly”?
- trigger html cleanup for all posts
- Validation algorithm in checkout field
- If has $title in widgets
- How to replace file_get_contents() with a WordPress Filesystem call
- get href content [closed]
- Warning: Attempt to read property “ID” on null in D:\xampp\htdocs\yba\wp-content\themes\young-brand-child\functions.php on line 162 [closed]
- Problem with AJAX in wordpress plugin
- Displaying text if post was within 5 hours
- Trouble inputting variable into WP query
- Change “No Comments” link to “My String” on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]
- How to say if meta_value is greater than 0 in an array?
- Adding a tag_ID column into Categories inside the admin dashboard?
- My website is not showing Footer section
- Listing titles and custom fields of entries within subcategories
- Best Way to Change a String in a WordPress Post
- WordPress site with embedded menu – gives You don’t have permission to access /wp-content/themes/xxx/taxonomy-redirect.php on this server
- Show get_sub_field value if it exists [closed]
- How to wrap every 3 posts in a div (and close the last div too) [closed]
- Dividing the loop to style post differently
- How to Display a List of Child Pages For a Parent Page in WordPress
- How to add PHP pagination to wordpress
- MySQL Query Returns Array () In Shortcode
- array wordpress when get is null
- Custom search query on WordPress page not working
- User meta needed in query is serialized – how to unserialize safely?
- PHP calling AJAX function that relies on passed PHP function values not working
- Order by title Child Pages displayed in a Parent Page
- how can I call a function when time expire
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Intermittent problem can the debug log give any clues?
- Echo short code syntax
- Filter by Post Type
- Updating the database after parsing CSV document
- Need help to create WordPress page that decodes a text file and publishes it in JSON format
- My blog posts section seems to be rendering the other blog posts inside the first? :/
- How to get total gross revenue for current month in the woocommerce dashboard status widget
- Decoding an array in PHP (from the Shopify API) [closed]
- PHP is_embed error showing up
- How fix error in the WordPress loop?
- PHP Session Variable to WordPress Error
- Run code before WordPress loads and insert data into WP if need be
- Use WP_Query Data In Cookie
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Is custom behaviour possible when asynchronously uploading?
- How can I show only if custom field has content [closed]
- need help to arabic text in wordpress
- Sorting Meta Fields?
- Themes with variable width or single columns? I want to display source code
- Category List in Theme Options Page
- Keeping the previous get value and add another value when submitted
- Pagination not displaying
- upload images on front by user using form
- Masking external links with internal link for member-only
- What does this if-statement do?: if($pages=’ ‘) {}
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- REST API custom endpoints for metaboxes
- Add default block css when the block has been added with php?
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- generate excerpt from the part of big text dump that contains keyword
- How to sort search result by post_title, then by post_content
- Custom Admin Menu Report for Specific User ID
- how can i link threejs in my functions.php file in understrap theme
- WordPress / PHP: Check if column has value and then check if value in array