Without your code it’s a bit difficult, so bear with me.
Can you do this:
$x=0;
$x=do_shortcode ('[your_shortcode]'); // say its 10
$valuetoadd = 20; //for example
$exams_count_sum= $x + $valuetoadd;
echo $exams_count_sum; //should equal 30
Or, if you are in a loop, this could be a good starting point:
$examtotal=0;
$examtotal_sum=0;
while ( $the_query->have_posts() ) : $the_query->the_post();
the_content();
$examtotal=do_shortcode ('[your_shortcode]');
$examtotal_sum = $examtotal_sum + $examtotal;
endwhile;
echo 'total is '.$examtotal_sum; //this will be your total
Related Posts:
- How to Add Custom Taxonomy To Woocommerce Plugin
- Custom Post Type, WP_Query and ‘orderby’
- List custom post types in dropdown
- Renaming Menu Item within Admin Menu Section for a Custom Post Type?
- Render a different post/template from within the template_include action?
- Can you have two CPTs with the same permalink structure?
- Numeric pagination custom post type
- Categories under custom post types doesn’t show properly
- Custom templates for posts like for pages: page-{id} vs single-{id}
- Custom post type archive sorted and grouped by date in post meta field
- Comment moderation on custom post types
- How to set default status to custom post type
- Post Via Email to a Custom Post Type
- Is it possible to display post title in reverse word order?
- Quickest way to get last or oldest post date – WP Query
- Best action hook to create custom post and assign taxonomy terms to it on plugin activation?
- Adding class to featured image
- How to redirect wp-admin/index.php to a custom post type?
- get_post_meta is returning image id
- How many Custom Post Types to register?
- How to get the post type from a category id?
- Custom Post Type won’t Register
- Query custom post type by category slug
- Is it possible to show full content of the post when there is only one post in a grid?
- Insert & order custom post types in/as submenu
- How to bulk copy custom fields between custom posts?
- Get image post ID in media upload
- Turn on and off custom post type from admin?
- How to make this menu drop down or like accordion
- Multiple meta_values in the pre_get_posts filter?
- Get posts between custom dates
- Search / Filter posts on Title/Content OR Tags
- map_meta_cap woes
- How to get post type and month/year before while loop for date.php file
- Several post types on WP Query by tag and taxonomy
- School & class blogs: Categorize with categories or custom posts?
- Custom Postype specific changes in admin panel
- Custom Post Types vs. Advanced Custom Fields (with Repeater Field add-on)
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Display and register custom categories for custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Adding predefined terms to a taxonomy
- How can I group posts by months and years?
- Get $post->ID from a URL
- Redirect to archive is single post has a certain term assigned to it?
- Displaying a div from an assigned meta_value when on a page
- Custom query – get_the_terms not work
- Custom taxonomies to define versions of a product
- why is the current page title being output?
- Proceed to the next video of the custom post type but remain on the same post
- Post URL based on Custom Post Types variables
- WP_Query not resetting after wp_reset_postdata
- How to show the current category of an article with CPT UI
- How to show custom field on specific custom post type posts only when filled
- duplicate comment section functionality and call it something else for custom post types
- Custom Endpoint For Custom Post Type from Child Theme
- Getting WordPress to store 0 values for custom post type meta
- How to add href=”” custom post type?
- Add filter to Admin list for all custom post types by their custom taxonomies
- Single.php for Custom Post Type > Taxonomy > Term
- Custom post types templates
- prevent sub categories to show up
- WP Query from two Custom Post type fields as statement
- Custom Post Type Archive Page showing as 404
- Cannot include custom post item within a menu
- Custom page with no headers, footers and its own CSS, Javascript
- Custom Post Type Single Page and Archive Page redirects to Home Page
- How to sort by multiple values in a nested WP_Query
- Apply a custom Template to a Custom Post Type from within a plugin
- Videos Post Type with Custom Filters
- Pull 2 different custom post type with 2 different WordPress into external website
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Use output of wp_dropdown_categories($args)
- How to Create Single template for custom post
- If thumbnail image else post title
- Different Configuration for the_excerpt()
- Add filter button to custom post type in admin area
- SQL LIKE in WP_Query
- How do I block/redirect ‘?post_type=cpt_name’ urls?
- How to load custom post type plugin after acf options page (or get settings from there another way)?
- Simple renaming my custom post type set with a plugin doesn’t work?
- can’t see categories in appearance-menu-categories
- Associate custom categories to different user IDs
- Cant move file after media_handle_upload
- Different read-more link for each custom post type [closed]
- archive-{custom_post_type}.php not getting recognized wordpress
- Comments not enabled for custom post types
- How to retrieve the permalink for a specific (custom) term?
- Meta-Box to add multiple items one at a time and on publish save all
- Values inside a custom field to determine which category posts to display
- CPT, Custom User Role and problem with user manager
- Allowing logged in users to create custom posts
- Custom Post Type and single-posttype template
- Custom post type as a category, for another custom post type
- Code to show related posts (custom post type and custom taxonomy/category) is messing with other code
- register_term_meta not working
- show posts under custom post type with same autj
- Is there a function that replace category name with a icon?
- Custom Post Type urls not working