You have added asterisk after the code.
Here is the perfect code.
add_action( 'adifier_single_product_description', 'extra_button_on_product_page', 9 );
function extra_button_on_product_page() {
global $post, $product;
if ( has_term( 'accessories1-3d-design', 'product_cat' ) ) {
echo '<a class="button" href="www.test.com">Extra Button</a>';
add_action( 'adifier_3d-design_description', 'extra_button_on_product_category_description', 9 );
function extra_button_on_product_category_description() {
if ( is_product_category('accessories1') ) {
echo '<a class="button" href="www.test.com">Extra Button</a>';
}
}
Maybe this is the reason you are facing problem.
Related Posts:
- How do I add settings to the Background Options Page?
- Import media to online WordPress from local development
- How to add a checkbox element to attachments editor with example
- Auto get_header and get_footer on every template?
- What is the right way to include a wp-admin file in your theme?
- Theme Check gives: Required: This theme doesn’t seem to display tags?
- Is it possible to use line break in theme description?
- How does WordPress decide what template to use as frontpage
- Override Current Theme Setting in wp_config.php
- Theme showing incorrect update
- modify a output of a widget
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- Which is the simplest theme for WordPress to use it as your base?
- How to highlight the current page in the nav menu?
- Is tag default in WordPress?
- “Display Site Title and Tagline” checkbox not working?
- Should I use language_attributes() or bloginfo(“language”) in html tag
- Getting jquery to work with custom theme
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Why does WP recommend against custom favicon functionality in themes?
- What’s the best action to use when you want to do something only once per theme setup?
- Excluding a page with a certain name from wp_page_menu
- Widgets with groups / sub widgets? Widget in a widget?
- Avada resources still loading from localhost after database migration [closed]
- No Appearance –> Header menu
- How do I create a custom partial / template?
- Internationalization and functions that use it
- Get a setting value conditionally in the Customizer api
- How should I be handling my theme version numbering?
- How would you accomplish the following advanced settings page?
- image url relative path not working in css file
- Update Custom Theme Version
- Storefront child theme not applying parent theme [closed]
- Sort wp_query by sum of two meta fields
- What can I use for small text when converting to WordPress?
- How to specify the “Main Sidebar” for a theme
- How to i style the elements from the TinyMCE
- Integrate WooCommerce theme with a WordPress theme [closed]
- Automated Footer information
- How do you use WordPress for a website that’s not in a blog format?
- How to develop a menu like wwe.com?
- Add tags to pages
- Why set a second parameter in the translate function?
- How to escape multiple attribute at once in WordPress?
- Override plugin option by with a custom theme
- Replace site title with logo when logo is uploaded in customizer using
- Review site using WordPress
- How to create query to get top 3 sticky/latest posts
- Fatal error: Class ‘ZipArchive’ not found
- Is it possible to determine when user is at “Media > Add New” vs “Post > Add an Image”
- What happens if a theme is no longer supported?
- Running a function on post update with new post meta
- Check if( selected() )
- Modify available templates (in dropdown)
- WP Customazation API doesn’t save the default Value
- Change WordPress Resource URL
- Adding content inside the anchor tags within WordPress main nav
- Sample Theme Options page for Multisite – what to consider
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- How to use shortcode inside of shortcode in theme
- Search Form Not Working
- My contact form – I’ve changed the source code but the changes are not being applied
- Theme calling page.php instead of home.php
- Open portfolio image in light box
- Let visitors show/hide a type of content
- Why do sticky posts show in this menu?
- Dot “.” in option value foobars save options function
- style variations hurt the editing performance
- how to create/register menu items that can be added to menus later
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- How to properly use AWS SES for a contact form?
- No templates for condition page.php Elementor
- Exclude categories from wp query not working
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- How to get custom logo with REST API instead of get_theme_mod();
- How can I change this SVG shape that’s generated?
- Can I set rest API endpoints from within a theme?
- Theme starter content translation is not working
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- How to add an image to a theme page template in code?
- remove_action(‘genesis_header’,’genesis_do_header’) hook not working
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- Breaking Categories Up into Individual Divs
- Different stylesheet for different pages not working fully
- Strip HTML tags on custom code from the_content
- wpdb->insert adds too many rows
- wpalchemy repeating fields dropdown issue
- Does WordPress require that your submitted theme supports multiple menu levels?
- WordPress loop not working on blog.php page
- Option to show/hide widget depending on is_home?
- Add Dynamic Sidebar to Exisiting WordPress Theme [closed]
- Why does the first loop take arguments from the second loop?
- How do I middle-align my header menu items in WordPress [closed]
- Theme layout for home page [closed]
- How to add Dummy content when active wordpress theme without xml import?
- Is there any reason that other theme elements (such as nav menus) shouldn’t be within the loop?
- Is there any way to show child theme in theme detectors?
- Not Able to Access Terms Under Custom Taxonomy Archive
- WordPress search field won’t get wider