HTML tags in bloginfo description
I found the answer. just replace bloginfo(‘description’) by get_bloginfo(‘description’) So echo html_entity_decode(get_bloginfo(‘description’)) Works as expected.
I found the answer. just replace bloginfo(‘description’) by get_bloginfo(‘description’) So echo html_entity_decode(get_bloginfo(‘description’)) Works as expected.
Well, I tested a lot of WooCommerce versions (3.3.x, 3.4.x and 3.5.x) using WP Rollback and I believe that was a error in e-mail templates that was fixed in version 3.5.2. I didn’t found nothing in the changelog about that: https://raw.githubusercontent.com/woocommerce/woocommerce/master/CHANGELOG.txt Here is the template in WooCommerce in version 3.5.2: I have to investigate more … Read more
I also can’t stand the fact the WordPress removes “javascript:void(0);” from my hrefs (or anything else TBH…) upon saving or using the visual editor. I just started using the Raw HTML plugin that does the job. I enclosed my code in [raw] … [/raw] codes, and did NOT use the visual editor. My “voids” remain … Read more
You were very close. You just had a single-quote swapped with a double-quote after the onmouseover. <figure class=”wp-block-image”> <img src=”https://website.com/wp-content/uploads/2019/08/image1.png” onmouseover=”this.src=”https://website.com//wp-content/uploads/2019/08/image2.png”;” onmouseout=”this.src=”https://website.com/wp-content/uploads/2019/08/image1.png”;” alt=”alttext” class=”wp-image-1111″/> </figure> I usually place semi-colons after the single-quotes to make it easier to tell when your quotes are balanced, whether Javascript requires it, or not.
You’re making it way more complicated than in needs to be. WP Mail SMTP is a plugin that allows you to have WP’s wp_mail() function send through an SMTP account instead of relying on the web server. You’re not, in this case, doing anything specific with WP Mail SMTP. What you’re going to do is … Read more
What you are referring to is typically a combination of ajax and pushState. It’s a nifty effect and can add value to the end-user experience. I deployed it on a WordPress site I built a few years ago (take a look here). I used a JavaScript library called Smoothstate that has fairly good docs (at … Read more
An object in PHP is a data type that you can read more data types here It’s good practice to check variable types before using them. In your case, you are assuming $user_meta is an object. Since you are filtering the_content(), it might be called some place else and returning that error. Here is your … Read more
Yes, you can keep nesting shortcodes. Just keep using the do_shortcode() until the deepest level is reached. https://codex.wordpress.org/Shortcode_API#Nested_Shortcodes So you can do this, [container] [other_column class=”extra-class”] [content] col 1 [/content] [another] col 1-2 [/another] [/other_column] [column] [another] col 2 [/another] [/column] [/container] To achieve output like this, <div class=”container”> <div class=”other-column extra-class”> <div class=”content”> col … Read more
WordPress has a ton of the get_the_*() functions which you can pass an ID and return a value you’re looking for. In this case you can call get_the_title() which returns the title of a post. An example could look like: echo get_the_title( 3249 );
get_permalink() (which is used by get_the_permalink() and the_permalink()) returns the “ugly” URL if the post is not published, e.g. draft or scheduled, but you can use the following function instead which temporarily sets the post status to publish so that we’d get the pretty URL. function get_future_permalink( $id ) { if ( $post = get_post( … Read more