Enclosing shortcodes create line breaks

If you want to just strip the <br /> from the content then you could modify your function to replace that signature with an empty string. It feels like a dirty hack, but it’s working for me. It’s worth noting that my Chrome tools show <br> but the actual code is rendering <br /> which … Read more

How can you alter the name of attributes in a shortcode?

function jk_WPSCEX_add_message( $atts ) { $output=”<a href=”” . $atts[‘link’] . ‘”>’ . $atts[‘text’] . ‘</a>’; return $output; } using the above function shortcode is generated in the form of [jk link=”http://jaskokoyn.com” text=”Like me on Facebook”] OR For Enclosed type of shortcode: function jk_WPSCEX_add_message( $atts, $content = null ) { $output=”<a href=”” . $atts[‘link’] . ‘”>’ … Read more

How to call shortcode on button click

You can’t add a shortcode to PHP directly. However, each shortcode executes a function, so you can just add that function to your link code. If your shortcode is something like this: function my_custom_shortcode( $atts, $content= NULL) { shortcode function } add_shortcode ( ‘my_custom_shortcode’ , ‘my_custom_shortcode’ ); use this in your link: <a href=”https://wordpress.stackexchange.com/questions/253796/<?php my_custom_shortcode(); … Read more

add post type pram to wp shortcode

Do you want to be able to switch between post types? If not, seems to me you could just duplicate the same functionality as you’re using with the per_page parameter, meaning: In your shortcode function just add a data attr to the #container-async div for the post_type(s). <div id=”container-async” data-paged=”<?php echo $a[‘per_page’]; ?>” data-posttype=”<?php echo … Read more

How to scroll to a shortcode-generated anchor

It’s not really a WordPress related question, but since it was simple I posted an answer for you. You can scroll to your element by using jQuery. Check if the query var is set, if so, scroll to the element after the page has been loaded: (function($){ // Function to get the current query var … Read more

Shortcode Site include in a other

It is very hard to understand what you are trying to ask? Do you want to know how to use a plugin’s shortcode? if so, then you can copy the shortcode in the content section of the new post or page. For Example, if the shortcode for the plugin is [plugin-shortcode]. Then just publish or … Read more

Help with Shortcode Functionality

Shortcodes should return a string, not echo data… so you have one of two options here: Change all echo statements and all functions that ‘echo’ content to use with return (concatenate all on a string, then return it) Use output buffering For output buffering, your code would end up like: function upcoming_events_shortcode() { $args = … Read more

Does anyone recognize shortcode ig_special_heading?

I think the plugin you are looking for is https://wordpress.org/plugins/ig-shortcodes/. Apparently it has shortcodes that start with ig_ and provides them for things like… Accordion Buttons Badges Notice box Columns Clearfix Divider Google maps Tabs Toggle

IFrame Shortcode plugin – issue

If you look in the browser’s development tools you’ll see this error: Refused to display ‘https://www.quora.com/‘ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’. This means that Quora does not allow itself to be used in iframes. If you’re just testing, then try another URL. If you actually want to embed Quora, then I’m … Read more

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