You need to tell the PHP to echo the div.
if (! is_front_page()) :
echo '<div class="button-kontakt"> <a href="https://wordpress.stackexchange.com/kontakt"><p>ANFRAGE</p></a></div>';
endif;
Unless you just want it on the top of the page, you need to add that code to a template file, not the functions file. If it is something that appears at the bottom of every page except the homepage, putting it in footer.php may be applicable.
Also, have you set the page you don’t want to see it on as the front page via the option in the Appearance->Customise menu?
Related Posts:
- Missing feature image link function
- How to customize the_archive_title()?
- How to override parent functions in child themes?
- Get menu object from theme_location
- Displaying the number of updates available in the Admin area
- Trying to use add_action and do_action with parameters
- When tax_query used, results disappear (0 =1 produced)
- Safe to disable wptexturize?
- Get a list of all available fields in the User Profile
- How do I use the WP image functions in a page template?
- How to remove Customize from admin menu bar after WP 4.3
- Targeting specific menu with wp_nav_menu_items
- why doesnt is_home() work in functions.php
- wp_get_attachment_image returns different image size
- Insert Ad Code in the Middle of a Post
- Enabling shortcodes for custom fields
- Passing variables to templates (alternatives to globalizing variables)
- Add options to featured image
- disable comments if array exists
- WordPress Change Post Templates,but not drop down, but Image selection
- Programmatically Add Font-Awesome Icons to Category Widget
- Remove images from get_the_excerpt
- Remove “says” from comments
- Reuse variable in hook callback
- Dynamically Register Sidebars For Each Top Level Page
- Run Product Filter Javascript On Page Template
- What is the criteria for pluggable functions?
- Can you use admin pages functionality on the frontend of your site
- How to add a column to the Trash page?
- Theme-Config tab in admin Pannel?
- Display more recent and less recent posts in same category
- Overwrite Parent Theme add_image_size in Child Theme
- Custom registration URL lost when user makes signup mistake
- Images uploaded using media uploader are appearing upside down
- How to target only the front page (not subsequent paginated pages) in theme/plugin?
- Individually styling date month year [closed]
- Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
- How to insert custom widget in custom sidebar in theme activation?
- Writing functions in WordPress functions.php that don’t replace a WordPress core function
- How to hook into a function offered by a plugin?
- Echo tags used to describe the theme
- HTTP_HOST changing in functions.php
- Change position of media in admin menu
- How to Display Frontend CSS for Administrator only
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- 404 redirect to previous category
- show first 3 thumbnails of posts in different sizes [closed]
- Getting custom image size URL in functions
- new_excerpt_more link not working properly
- Where to add the permalink in this function?
- WordPress function saves a post twice and updates all posts
- Change CSS for logged in users
- Always the Latest google jQuery instead of default WordPress jQuery
- if statement for wordpress default featured image on single post
- Function to display post by specific author
- Return category name with & Ampersand doesnt work
- Control the srcset much more (not all sizes in it each time)
- Warning: join(): Invalid arguments passed in post-template.php
- javascript and css links not working on sever
- is_page() or is_single not working
- What are the meta fields for an attachment?
- how to change “posted by” words
- WordPress wraps span tags into p tags
- WordPress can’t get jquery/unslider to work
- Replace admin header logo with an image
- how get number of twitter followers in wordpress
- template_redirect action only firing if logged in
- Unable to use get_page_by_title() more than once per page?
- Featured Image and Tags problem
- Advanced method to control cache of enqueued style/script
- How to require a config file in a template and in function.php?
- Issue passing action class to nested function. Admin Columns
- Populate Product Regular Price with a calculated ACF Field Value
- Header menu aligned right on all pages except for single-post page [closed]
- large image size of 1440×1440 not pulling 2x of 2880×2880 image
- How to make the RTL.css the dominant css code?
- Auto remove tags on certain date
- get_field() with ID in one signal filter not working
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- I’m getting invalid taxonomy in init action
- Is there any requirements to do socket programming with WordPress?
- Only seems to be displaying one child when there are supposed to be multiple
- Rest API User Levels
- adding google analytics via echo or between tags
- Slider Thumbnail Size Issue [closed]
- same get_posts function works diffrently in tag.php and functions.php
- Call custom field using php
- WordPress permanently logging users out
- Meta Box value not been pulled in
- How to Update User Meta Field other than from profile?
- Retrieve array of attachment IDs attached to a given Post ID
- add_theme_support not outputting thumbnails
- More link – not text
- update_user_option not working as expected
- Shortcodes not outputting in correct divs
- How do I access variables outside a function [closed]
- Help finishing script to export WP user data when form submitted
- PHP Notice: Function is_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false
- woocommerce_sort_product_tabs() expects an array