How to add a credit line to a photo caption

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

How do I display image files as links?

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

Changing ‘Add to cart’ button text and relink for some specific products [closed]

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

Linking images in WordPress Paginated Post

_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

How to add future Posts to the new “Internal Linking” Feature

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

Linking Javascript in functions.php file

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