Possible to limit internal link search to post types with Gutenberg editor?
Possible to limit internal link search to post types with Gutenberg editor?
Possible to limit internal link search to post types with Gutenberg editor?
I tried to do this once and almost got almost. Here’s what I did learn. Depending on your needs, this solution may be workable. You can append content to media when it’s inserted into the editor using the get_image_tag filter: /** * Filter to get caption and append image information to it. * * @return … Read more
There’s no such “non-coding newbie”-bulk-thing for the process. You have to do that for each of the image, when you are uploading the image to the site and/or post/page. On the right panel of the media upload pane, change “Link To” to “Custom URL” and put the URL (whatever you like – internal or external) … Read more
Per Ashish’s answer that’s been posted, below is the update code for clarification with the correct answer by switching add_to_cart_url() to get_permalink(): global $product, $post; $hasCustomization = get_post_meta( $post -> ID, ‘_wcm_custom_design_checkbox’, true ); if ( $hasCustomization == ‘on’ ) { echo apply_filters( ‘woocommerce_loop_add_to_cart_link’, sprintf( ‘<a href=”https://wordpress.stackexchange.com/questions/237352/%s” rel=”nofollow” data-product_id=”https://wordpress.stackexchange.com/questions/237352/%s” data-product_sku=”https://wordpress.stackexchange.com/questions/237352/%s” class=”add_to_cart %s product_type_%s”>%s</a>’, esc_url( $product … Read more
_wp_link_page() returns a HTML string and not just the URL address of the link. So, if the link’s URL address is http://example.com/blah/2/, then _wp_link_page() would return: <a href=”http://example.com/blah/2/”> ..i.e. it returns the opening a tag for that link. So replace the following: $content = preg_replace(‘/(<img(.+?)\/>)/i’,'<a href=”‘.$link.'”>$1</a>’, $content); ..with this: $content = preg_replace(‘/(<img(.+?)\/>)/i’, $link . ‘$1</a>’, … Read more
Step 1) Create a new shortcode in the Gutenberg editor. Step 2) Enter your shortcode. Step 3) Add it to reusable blocks Step 4) Give it a name Step 5) Navigate to the page or post where you want to use that block again. Call that block by typing it’s name /Sta… Final result
Ignore posts content in the posts queries for internal linking
That’s a good catch. Here’s a possible work around. Create the future post placeholder and set the date ahead in the publish date picker. Then copy either the permalink or use a URL shortner plugin like le petit URL to generate a short URL. Copy/paste either URL into the internal linker. Screenshot: https://skitch.com/noelsaw/r1ni7/edit-post-wpverse-wordpress
So this looks like you’re using a JS package manager, possibly Dustin Diaz’s ScriptJS? And I’m assuming you are storing all these files within your theme folder it would then be just a matter of linking to your script.min.js file via the wp_enqueue_script mechanism as follows: function wpse143251_enqueue_theme_scripts() { wp_enqueue_script( ‘dustindiaz-scriptjs’, get_template_directory_uri() . ‘/assets/components/plugins/ajaxify/script.min.js?v=v1.9.6&sv=v0.0.1’ ); … Read more
This line is your problem: $new_site_name = $site_name . ‘<sup>echo ‘<img src=”‘ . plugins_url( ‘images/wordpress.png’ ,”logo.jpg” ) . ‘” > ‘</sup>’; Here you’ve muddled up the quotes and put PHP code inside a string expecting it to still work. e.g. echo ‘ this is inside a quote:’ inside a quote ‘ . ‘; It doesn’t … Read more