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_
- check difference between two timestamp in custom plugin
- WordPress generating Undefined Variable warning
- How to speed up a wordpress function with multiple loops?
- How to Display Image Meta underneath EVERY image in EVERY post
- Custom excerpt function re-factoring
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- How to change a public function inside a class of a plugin?
- How to enqueue CSS and JS only on specific template?
- get_the_terms – only top level
- syntax issue on php 7.4
- How do I fetch all comments per post via WP REST API?
- How do I publish only one page to production after making changes on staging?
- Have CSS Class Added with `is_page()` WP function
- Deregistering a script in WordPress seems impossible
- Slide in Panel WordPress Post
- Add htaccess rules with insert_with_markers at beginning of htaccess
- custom shortcode will not display the wrapped content
- Changing Woocommerce flat rate every nth number of items
- Shortcode content output but not in correct place
- How to call function at the bottom of post using plugin?
- Use wp_get_recent_posts with search term
- Convert all images to PNG on file upload
- How to restrict page access to logged-in users?
- Remove query string specific key value
- is_page “range” for if statement?
- Calculations in functions.php [closed]
- If search results empty then execute certain code
- How to restrict wp generate attachment metadata() to certain intermediate image sizes
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- Shortcode return function with link href inside PHP
- Can’t load WP function into external function