Floating CTA Image Integration

You can do it by using Sticky Side Buttons plugin. Follow these steps: Install and activate the plugin. Head to Sticky Side Buttons menu into your WordPress dashboard. Click on Add Button. A box will open up, showing the options for adding text, icon, link, and color for the button. Under the General Settings section, … Read more

Custom Route Returns 301/Passing Variable from Input

Just a guess: Your regular expression ‘verify/(?<voucher_code>)’ is not correct. Have a look here. They are using e.g. (?P[a-zA-Z0-9-]+) there’s a P inside. Another reason could be that you are missing a / before the verify. Try this: function register_voucher_endpoint() { register_rest_route( ‘voucher’, ‘/verify/(?P<voucher_code>[a-zA-Z0-9-]+)’, array( ‘methods’=> ‘POST’, ‘callback’=>’verify_voucher’ )); } [a-zA-Z0-9-] defines the regular expression … Read more

Add button to My Sites dashboard page (multisite)?

This is the solution: add_filter( ‘myblogs_blog_actions’, ‘my_sites_visit_site_target_blank’, 10, 2 ); function my_sites_visit_site_target_blank( $actions, $user_blog ) { $to_replace = “>” . __( ‘Visit’ ) . ‘</a>’; $to_replace_with = ” target=”_blank” >” . __( ‘Preview 1’ ) . ‘</a> | <a href=”‘. esc_url( get_home_url( $user_blog->userblog_id ) ).’/customfolder/” target=”_blank”>Preview 2</a>’; return str_replace( $to_replace, $to_replace_with, $actions ); }

Creating a WP Test site without /uploads etc

Create a hard or symbolic link. However, you would of course need to take care that testing doesn’t affect the contents of wp-content. Another approach would be to put wp-content (or a copy) into its own file system partition (or just make a .img file from it). Then dd (or its Windows analog) should duplicate … Read more

Add a menu item to admin dashboard which isn’t a link? [duplicate]

You may want to look at adding admin style and then targeting the menu: function admin_style() { wp_enqueue_style(‘admin-styles’, get_template_directory_uri().’/admin.css’); } add_action(‘admin_enqueue_scripts’, ‘admin_style’); This is just an example: #menu-comments:before { border-top: 1px solid red; content: “”; display: block; margin-top: 10px; margin-bottom: 10px; width: 100%; } This adds a red divider above the “comments” menu, but adjust … Read more