How to use tag in wordpress?
How to use tag in wordpress?
How to use tag in wordpress?
Dynamic price for payment button
Can I turn an image into a button?
you can use this code add_action(‘init’,’random_add_rewrite’); function random_add_rewrite() { global $wp; $wp->add_query_var(‘random’); add_rewrite_rule(‘random/?$’, ‘index.php?random=1’, ‘top’); } add_action(‘template_redirect’,’random_template’); function random_template() { if (get_query_var(‘random’) == 1) { $posts = get_posts(‘post_type=post&orderby=rand&numberposts=1’); foreach($posts as $post) { $link = get_permalink($post); } wp_redirect($link,307); exit; } } ANd then use this for random redirect <a href=”http://…..com/?random=1/” >Random Post</a>
With an External/Affiliate product, if you leave the Product URL field empty, Woocommerce doesn’t display the buy button. You could then add your own link to buy in the product’s description. Add a class of “button” to the link and it’ll look just like a proper button. eg, <a href=”https://example.com” class=”button”>Buy now</a>
Your method is complex… Here is simplest function to add BUTTON in TinyMCE: (insert this code in funcitons.php): add_action(‘admin_init’, function() { if (current_user_can(‘edit_posts’) && get_user_option(‘rich_editing’) == ‘true’) { add_filter(‘mce_buttons_2’, ‘register_buttonfirst’); add_filter(‘mce_external_plugins’, ‘add_pluginfirst’); } }); function register_buttonfirst($buttons) { array_push($buttons, “|”, “shortcode_button1” ); return $buttons;} function add_pluginfirst($plugin_array) {$plugin_array[‘MyPuginButtonTag’] = plugin_dir_url( __FILE__ ).’My_js_folder/1_button.php’;return $plugin_array;} add_filter( ‘tiny_mce_version’, ‘my_refresh_mceeee1’); function … Read more
If you got everything else running and it is really just the redirect that you can’t manage, then replace the ‘alert’ lines in Ottos example with window.location = “http://www.your-domain.tld/”.
Maybe you should add action=”” in echo'<form method=”post”>’; change to: echo'<form method=”post” action=””>’;
there is a major problems in your code : 1- you must use the <form> when you want to submit the data whatever the system you use (wordpress, EE ,php ,html …). 2- if you want to check if the page submitted or just visited without submitted, you must change your condition to : if(!empty($_POST)){ … Read more
Well, I figured it out myself. I updated my theme and all related plugins, and then magically, the PayPal code stopped getting switched each time that I clicked “update” for that page. Who knows why that was happening, but I guess just a glitch in the new version of WP/Avada working together.