Instead of two functions, just put the gallery assets code inside of the portfolio gallery function.
Or nest it. Nesting is kinda ugly though.
Related Posts:
- Fatal error: Call to undefined function plugin_dir_path()
- Dynamic URL to reference custom PHP files
- Enqueue less file not working in child theme?
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Execute only on a certain page
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- Using wp_get_image_editor in a standalone script
- New Plugin Review
- Making Quote Plugin more efficient
- How to access function from outside of a class within this class in WP plugin?
- PHP can I add line numbers to file_get_contents()
- Adding tawk.to code just before body tag on functions.php file
- Adding Default Settings to Theme My Login plugin
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to access global variable $menu inside a class function
- How can I remove a function that has been added to wordpress with add_filter?
- what is the best practice to add new field to an api route
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to call plugin function per site in a multisite?
- WordPress Custom field Colors
- jQuery code not working when included in functions.php
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- How to use html inside a functions.php code?
- Plugin Generate Unexpected output during activation
- Using data sent via AJAX in multiple functions on a WP plugin
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- linking stylesheets and scripts with functions.php
- Custom meta box values are not getting saved for my custom post type
- how to save checkbox data for custom setting?
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- Enqueing External JS on the remote server JS
- Call to undefined function error in plugin
- Enqueueing a code block from an options framework
- Execute Jquery when a specific page in my plugin is loading
- send popup after wp_redirect()
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Using ACF Relationship field to set post type to draft or published status
- How to change basename url for wp-admin?
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- Only the first image uploads
- Add Pre-Defined Value to Click Counter in WordPress
- Illegal string offset checkbox
- ssl redirect function is not working
- Custom plugin: how do I call a PHP file if settings option is set to true?
- How can i avoid duplicate same post in wp?
- Display a custom name when the user has no name settle in his account
- How to change order inside foreach using wp_enqueue_script?
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- How to override theme’s public static function inside of a trait?
- Load script and styles using an array of resources
- post_exists stops working in a scheduled event
- Taxonomy Child Term, Counter is staying on 0
- PHP get_category() function redeclared
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Chosen Select jquery Not Working in Plugin
- Permission error on plugin save
- Trouble using wordpress functions in a pop-up modal form
- Adding Gravity Form With if(is_page) Is Not Working
- Issues separating my Plugin pages into different files
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- display php code in header using wp_head()
- How do I change the Go To Categories link in the term_updated_messages
- WP Custom tables query
- Warning: filemtime(): stat failed for wp_
- Cleaning up WordPress to improve performance?
- How can I modify the permalink via a filter?
- Database “Migration” for Plugins?
- Can’t load WP function into external function
- Image as Sales Badge
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- Hook called before text widget save
- Limit Taxonomy Output in Conditional Statement
- wpdb prepare insert table doesn’t work
- How to modify the default feed via a function
- How to remove the space before the ellipsis in excerpt?
- custom plugin with upload files does not work
- Aspx/Rss feed – failed to open stream: Redirection limit reached
- Adding an Unlinked Space in a Custom Function
- More gentle way to hook WordPress custom url
- How do I call an external php non WordPress class into functions.php?
- no_rest_route error on custom routes
- A function to get the content of a page
- adding dynamic/multiple slug values in ‘option_none_value’
- Advance custom fields variable with if statement & Function
- Restrict wordpress access to logged users only
- Update user meta when an external link in admin notice is clicked
- Is there an option to execute javascript file only on plugin activation
- Ajax in a class instantiated via shortcode
- Populate Posts based on category selected using AJAX that means without page refresh
- Why transition_post_type hook is called twice for the same post?
- Can’t get_users info by using json_encode
- Submit to itself don’t work
- Page returning ID from array, how to return the correct values for post in acf wordpress
- Removing all my hardcoded URLs with get_site_url()
- Highlight main menu when on specific posts or pages
- Woocommerce – Shipping tax class based on cart items not using the highest tax available