Add custom shortcodes to the Welcome Mail

Based on your updated question and comments, this should be what you are looking for: function wpse_225078_wpbd_tags( $tags ) { $tags[‘one_time_link’] = one_time_link(); return $tags; } add_filter( ‘wpbe_tags’, ‘wpse_225078_wpbd_tags’ ); The idea is to hook into the tag system provided by WPBE so you can just use %one_time_link% in your email template. Please note that … Read more

Is Post-Author-Id shortocde

This is pretty straightforward as far as shortcodes go: function wpse_226998_post_author( $atts, $text ) { if ( ! empty( $atts[‘id’] ) && $atts[‘id’] == get_the_author_meta( ‘ID’ ) ) return $text; } add_shortcode( ‘post_author’, ‘wpse_226998_post_author’ ); And in practice: [post_author id=”8″]This post is by author ID 8[/post_author]

Automatically add class-attribute to gallery?

If you take a look at native galleries they already have IDs with counter implemented: $instance++; … $selector = “gallery-{$instance}”; … $gallery_div = “<div id=’$selector’class=”gallery… So first gallery within a post will have <div id=”gallery-1″… and so on. This is used by core itself to target different styles at each instance. If you need to … Read more

Running Filter or Shortcode Before Query Prevents Excerpt from Showing

It seems you need to rest the post data before return the $postCount. Before return it, add the follow: wp_reset_postdata(); — There is a difference between wp_reset_query()and wp_reset_postdata(), as explained here. wp_reset_query() – ensure that the main query has been reset to the original main query. wp_reset_postdata() – ensures that the global $post has been … Read more

Removing text + shortcode from all posts

Simply follow these steps: Export your database, save a duplicate of it Open the database in a text editor, I use Sublime Search for that [shortcode] and text and remove those (can replace them with a backspace or anything else you want) Save that edited database Create a new database and upload this new data … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)