For the button behavior,
If it’s a one-off use case, you could add custom php conditional to check the referring url $_SERVER[‘HTTP_REFERER’] and current page/post ID or url. Then, either add a class to the button’s containing div wrapper in the template for hiding via css or directly output/include the button html in the template file itself.
If it applies for various cases, I’d recommend creating an array of 2-d arrays (referrer url or post id, target url or post id). Then use (setting/checking) a session cookie to loop through the array to see if any conditions are satisfied and in turn, show or hide button
Related Posts:
- How do I programatically empty trash?
- Primary and Secondary Button Classes
- Show current navigation path from menu
- How to insert a Button or custom text on twentyseventeen header
- Override admin submit_button() functionality
- Remove “Save draft” button without using CSS
- Download a file and scroll to bottom div on button click
- Remove Save Draft & Preview Buttions.. and also Statius: Draft & Visibility: Public
- Add multiple custom buttons with custom links after add to cart button for every product
- Loading elements with a button
- How to align Button on the right of the image on desktop but below the image on mobile
- How can I center the “Buttons” in the WordPresse editor?
- Add button to menu item at the same row
- NavBar Button Clicks (need 2 clicks rather than 1 click)
- Using button from the function submit_button() triggers alert
- Create Button Using Provided Code
- How to add a breadcrumb to WordPress header?
- Page/Post path in Search Results
- Button to execute shorcode [closed]
- PayPal buttons not working after 4.2.4 upgrade
- Button not working?
- submit button not work
- How to get the path to the current theme?
- When moving a WP site, why does wp-admin redirect to old site?
- Making breadcrumb with wp_nav_menu
- How i can i add a split button or list box to the WordPress TinyMCE instance
- How to display a raw HTML page (bypassing WordPress theme, scripts, etc)
- Breadcrumbs showing Parent and Child Pages
- Hook filter to change wp_upload_dir() path in multisite
- Editing Screen: Make Update or Publish Button Follow The Page
- How to inject custom url path for page ?
- Custom Shortcode and Button not Working after 3.9 update
- How to Make admin Sidebar Menu always be Collapse by code
- how to automatically generate hierarchical menus from hierarchy of pages?
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- WYSIWYG – Getting the “link” button from HTML mode in Visual mode
- Adding another “Add Post” button to admin
- How much control do we have over CPT rewrite slugs? Can I create a “root” page for my CPT with out the page path, and then have paths for other pages?
- Changing the server path
- breadcrumbs & rel=”nofollow”
- Pulling images from a subdomain
- Breadcrumbs on Product Page Always Show Wrong Product [closed]
- Can I have /blog and /foo and /bar all point to the same blog?
- How do I create a custom add media button modal?
- Adding TinyMCE buttons without removing plugin buttons?
- Woocommerce Porto Theme Hide Selected Categroy for Breadcrumbs
- How do I hide or remove ‘Category’ from wordpress breadcrumbs
- Add multisite switch button. Click to switch to other page in same admin area
- Why my image upload button is not working in wordpress widget area?
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- problem after update 4.9.6 [closed]
- Function won’t run onclick using Ajax
- WordPress SEO plugin (by Yoast) and BuddyPress [closed]
- Breadcrumbs stop working on a specific template file
- Apply template by path/slug related to custom post type?
- Hardcoded paths in my plugin
- Convert to shortcode?
- Relative URLs within site
- WordPress breadcrumb depth
- TinyMCE: Move buttons from 2nd row to top row
- Can I prioritize post categories for choice for breadcrumb trail?
- Absolute paths in backend for plugins after moving wordpress
- Path Issue – Getting “localhost” instead the IP
- Button writing to MYSQL database
- Gutenberg button removed on save if its empty
- Wordpres Tinymce custom button (Gavick guide)
- Multisite problem with unexisting paths to CSS etc
- Post template with breadcrumb needs to show page navigated from
- Edited one page in my working menu and now all menu buttons don’t open unless I right-click and open in new tab
- Hide ‘add to cart’ when certain value in dropdown is selected
- How to route root path / to /xyz in nginx?
- Best practice to call a function from a button-link?
- Menu with sub-items but without link
- Create Button for Shortcode in Text Editor
- How to create 2 preview button in a post?
- Breadcrumb that shows multiple custom taxonomies
- Customising Breadcrumb NavXT [closed]
- wp_editor customization
- Eliminate menu collapse button on website
- Show only one level in breadcrumbs
- Theme parts path location dump
- How to include backend buttons css on frontend?
- Customize TinyMCE Buttons
- Replace category with page name in breadcrumb-navxt plugin
- Breadcrumbs for Single Image page
- Home not showing in yoast breadcrumb
- Where do URI files come from?
- Change text “My Basket” in woocommerce artificer theme
- Get menu names and same depth level menu names
- how do I create a breadcrumb to work with multiple custom taxonomies
- A conditional button
- Simple Share Buttons Add Plugin and Custom Post Type
- custom post type breadcrumb error when has_archive = false
- Why can’t the WP-CLI installer find my php.ini?
- Facebook redirect buton
- How to add breadcrumbs to any WordPress theme
- add button to tinymce
- Stop breadcrumb function retrieving custom post type template name
- Including $_SERVER[‘DOCUMENT_ROOT’] to load files outside of wordpress installation doesn’t work remotely
- wp_enqueue_script() with unknown path and maybe symlink