There is no need for any kind of (single or double) quotations:
… 'base' => $cat,
…
about quotations:
https://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in-php
Related Posts:
- How do I make an HTML table from a database table?
- dbDelta support for FOREIGN KEY
- Modify previous and next text from pagination links
- Editor role cannot save custom theme options
- Does WordPress cache get_user_meta() results?
- wp_customize_image_control default value
- Initialize WordPress environment to use in a real cron script
- “wp_enqueue_style();” don’t load new edited style
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 64 bytes)?
- How to Add a Link to the Drop-Down User Menu in the Admin Bar?
- Print number of post (in reverse)
- After upgrading to PHP 7.0 my contact form outputs error
- Count number of published posts by type
- Remove username in emails or swap username for email
- Get/Set wp.customize.previewer.previewUrl
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Why is ‘admin’ missing from my admin links?
- List of posts by day of the week
- What SQL / WordPress queries would need a nonce?
- Custom field value not saving when it contains a URL?
- Do changes to WordPress permalink custom structure affect old urls?
- Creating bulk posts with Youtube videos
- How do I let users upload files to a chosen location?
- Adding hreflang tags automatically in WordPress subdirectory multisite
- How to test nonce with AJAX – Plugin development
- add_image_size for header_image
- Wp-login appears White Screen, Error: Cannot modify header information
- Set WP_query ‘order’ option by another tables value
- Creating user status mode in WordPress
- Need Help Fixing My Iframes [closed]
- Implementing update_user_meta
- Return a numerical function value in Customizer controls
- Enable custom logo upload if logo is not in header
- theme_root returning a truncated URI
- Change “en-US” to “en”
- Remove the last X characters of a custom field value
- Only first shortcode gets executed
- Notify users only on post publish
- Echo a shortcode div after every 3 posts
- Get all categories post is not in
- Error while setting role
- Code snippet to show current php version inside “At a Glance” box in admin
- getting url from variable that calls picture of current page, not working. Only displays everything instead of url
- str_replace with the_content is not working
- How to disable send e-mail notification new comments for some posts
- trying to put an active hover to my custom nav category buttons [closed]
- Make textarea required. Help [closed]
- How to Update an old theme for the latest wordpress version
- Handling repeater data
- Adding Updated Post Date PHP Custom Theme
- How can I use custom menus with a Bootstrap WordPress theme?
- Create a a form for custom taxonomy terms
- How to make blog post entries appear as input form instead of just text?
- foreach repeat html structure after every nth for attachment [closed]
- Make separate text boxes for separate WordPress Custom Fields
- How to implement __() function in my theme’s php file?
- In PHP how do I make my navigation bar show certain links to admins only?
- Get current user id in function php
- Proper way to remove html code on child theme
- How to pass parameters in wordpress shortcode?
- Trying to add Custom Post Type to this functions.php command
- Display a custom name when the user has no name settle in his account
- Why can’t I connect to the wordpress install page with Nginx?
- Discount in the specific product title using keyword ( Woocoommerce )
- Can’t make lazy load for my site, help!
- Place product field value as variable in php
- WordPress search query, how to modify the sql
- Make a full-width wordpress page
- Modify post image in full size
- Javascript / PHP – closing the loop
- How to link all featured images to custom url in single.php for only non-logged-in users?
- How to get current post id in gform_field_validation gravity forms
- Autoloading Classes in Plugins
- Call custom JS function from PHP
- Putting hyperlinked and non-hyperlinked text in one line, centered, on .php [closed]
- Need Quick Help With Product Category Page
- how to remove replicating a tag inside loop?
- My query keeps looping infinitely ! how to stop it?
- Singleton plugin activation; create database
- Calling header from JavaScript file
- blank page when trying to change upload directory
- how to use php in custom toolbar form
- admin menu naming
- Why isn’t my link attribute getting my css?
- AJAX with Selectbox Plugins (Select2, Chosen, Selectize)
- Difference in Get Variable Location
- Display selected parts from selected pages on the frontpage?
- Get current WordPress page then add #post ID to the end
- WordPress article with 50 000 words loading slow – 100% cpu
- Import and use a variable in additional settings of Contact Form 7 [closed]
- Call custom posttype outside the functions.php
- How to avoid timeout waiting for output from CGI script?
- Use HTML Form Data in PHP Function – WordPress Admin Page
- Front-end major break after upgrade PHP 8.0 [closed]
- wp_enqueue_scripts with JS script as a string
- rest_cannot_create_user – Sorry, you are not allowed to create new users. CURL WORDPRESS REST API
- Cannot install plugins or themes on new WordPress installation at Cloudways
- links Slick jS library using wp_enqueue_scripts not pulling
- How to run site locally after downloading database
- How to change shipping method title based on cart amount?