Adding Button to Shop Page in WooCommerce [closed]

You need to go beyond CSS to do this. It requires hooking into the loop template like so: add_action( ‘woocommerce_after_shop_loop_item’, ‘my_112757_add_product_link’, 11 ); function my_112757_add_product_link() { global $product; echo ‘<a href=”‘ . esc_url( get_permalink( $product->id ) ) . ‘”>More Detail</a>’; } Put the above code in your theme’s functions.php file. You can also add a … Read more

How to Add TinyMCE’s plugin in wordpress?

You can register TinyMCE plugins using mce_external_plugins filter: add_filter(‘mce_external_plugins’, ‘my_tinymce_plugins’); function my_tinymce_plugins() { $plugins_array = array( ‘my-tinymce-plugin-name’ => ‘tinymce-plugin-url-of-js-file’ ); return $plugins_array; } You can add that code to functions.php file of your theme, or better in a WordPress plugin to make it theme independent. Also, I recommend to not upload externa tinymce plugins to … Read more

Can a plugin add to header/footer/body content?

Hooks are going to be your best friend here. You can filter post content by using the the_content filter for example: add_filter(‘the_content’, ‘wse_174099_append_to_content’); function wse_174099_append_to_content( $content ) { //get your data $custom_items = get_option( ‘option_name’ ); $content .= wpautop( $custom_items ); //always return when using a filter return $content; } You can hook into the … Read more

Unique post-id for WordPress Multisite Network

Yes. Use $post->guid instead of $post->ID. NB: guid must be in lowercaps for it to work. Detailed explanation here: https://wordpress.stackexchange.com/a/209832/71131 Some additional detail on the purpose of keeping $post->ID as a backup in your third-party service: https://wordpress.stackexchange.com/a/209833/71131

How do I add a template to a theme using a plugin?

Here is a fairly simple approach I was able to get working within a plugin. You’ll want to reference https://developer.wordpress.org/reference/hooks/theme_page_templates/ and https://developer.wordpress.org/reference/hooks/template_include/ as you review the code below. <?php //Add our custom template to the admin’s templates dropdown add_filter( ‘theme_page_templates’, ‘pluginname_template_as_option’, 10, 3 ); function pluginname_template_as_option( $page_templates, $theme, $post ){ $page_templates[‘template-landing.php’] = ‘Example Landing Page’; … Read more