FAQ Database Discussion Community


Regex Nested Shortcode Does Not Work

php,regex,nested,shortcode
Can someone tell me why this does not work ? - https://regex101.com/r/hJ5zN6/11 Test string: [test][dzspgb_container][dzspgb_row][dzspgb_row_part part="1.4"][dzspgb_element text="whwaha" type_element="text"][/dzspgb_element][dzspgb_element text="test" type_element="text"][/dzspgb_element][/dzspgb_row_part][dzspgb_row_part part="1.4"][/dzspgb_row_part][dzspgb_row_part part="1.4"][/dzspgb_row_part][dzspgb_row_part part="1.4"][/dzspgb_row_part][/dzspgb_row][dzspgb_container]test...

Hide Shortcodes From Wordpress RSS Feed

wordpress,rss,feed,shortcode
I added Adsense to my content via shortcodes. But Adsense codes appears in RSS too. How can I hide shortcodes from RSS Feed and show only for in posts ? I am using sahifa wordpress theme....

preg_split shortcode attributes into array

php,regex,quotes,shortcode,preg-split
I would like to parse shortcode into array via "preg_split". This is example shortcode: [contactform id="8411" label="This is \" first label" label2='This is second \' label'] and this should be result array: Array ( [id] => 8411 [label] => This is \" first label [label2] => This is second \'...

How add condition in wordpress shortcode loop

php,wordpress,wordpress-loop,shortcode
I want to multiple of 2 close div and open a new div in wp loop using shortcode post loop. if($i % 2 == 0) {echo '</li><li>';} $i++; How Can do it? General loop: <?php $i = 1; //added before to ensure it gets opened echo '<li>'; if ( $wp_query->have_posts()...

Wordpress shortcode for tag list

php,wordpress,plugins,tags,shortcode
I need to insert tags (of the post) inside post in the exact place. (default: they go after) As I understand the only way is to use shortcode and write its description in functions. I think its an easy one including "print $tags_list", but I haven't managed to write the...

Front End of Wordpress Plugin

wordpress,plugins,frontend,shortcode
This is my first plugin that i am developing. I have only one file in my plugin folder which has all the code that is handling my admin part. I have my own custom tables. I'm not using any wordpress table for it. Structure: plugin/amt amt.php (This file has all...

Wordpress do_shortcode work in one widget but not another

php,wordpress,widget,shortcode
I have a couple of shortcodes that I wan't to be able to use in my widgets. I've added add_filter('widget_text', 'do_shortcode'); to functions.php (theme) and it works well when I use the default WP "Text" widget. But when I try the shortcodes in my own widgets (I've developed them myself)...

How to apply TAB on several lines in Android Studio

android,android-studio,shortcode,tabular
I am wondering if there is a shortcode (MAC) to tab several lines (see example below). <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Last Name" android:id="@+id/textView" android:layout_column="0" android:layout_weight="1"/> -> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Last Name" android:id="@+id/textView" android:layout_column="0" android:layout_weight="1"/> I looked through the command list, but couldn`t find...

Custom Short Code to Loop Through Custom Content Types

jquery,html,wordpress,shortcode
I have a website that use the custom-content-shortcode plugin for Wordpress. It has some incompatibility and has brought down our site a couple of times. I am doing the follow: [loop type="th_sermons" taxonomy="th_sermons_speaker" value="speaker-slug" count="5"] <li> <a href="[field url]"> <span class="placeholder">[field thumbnail]</span> <p> <h5 class="rlcf-custom-sermon-list-title">[field title]</h5> <span class="rlcf-custom-sermon-list-date">[field date]</span> </p>...

wordpress - adding shortcode with tax_query value terms variable

php,wordpress,shortcode
I'm writing a shortcode function for WP, but I have an issue and I don't understand how can I call a variable directly in wordpress when i write the shortcode, like this [shortcode-name terms="news1"] this is my code, for the moment i pass the terms='news1' in the query, but i...

How I can use php if statment in wordpress shortcode?

php,if-statement,shortcode
I will try to make a WordPress plugin. My all code is ok but I can't understand how I use if else statement in custom post shortcode. global $post; $accordion_icon = get_post_meta($idd, 'accordion_icon', true); $list .= ' <div class="collapse-card"> <div class="title"> <i class="fa '.$accordion_icon.' fa-2x fa-fw"></i> <strong>'.get_the_title().'</strong> </div> <div class="body">...

Add shortcode inside another with echo

wordpress,wordpress-plugin,shortcode
I try to nest a shortcode to another in my page. Why this isnt working? [toggle] <?php echo do_shortcode('[Best_Wordpress_Gallery id="1" gal_title="my"]'); ?> [/toggle] ...

WordPress Shortcode thrown outside WYSIWYG html DIV

html,wordpress,shortcode,static-html
I'm trying to put a shortcode within my page via the Wordpress Page WYSIWYG editor in a specific element. The shortcode does appear and works, but instead of staying within my , when the page renders it does not render in the but instead near the top of my page...

in woocommerce, is there a shortcode/page to view all orders?

wordpress,plugins,woocommerce,shortcode
I'm using the plugin woocommerce for my wordpress site, and need a section where member can see their order history. Are there any shortcodes or page in woocommerce that shows the order history of a member?

Shortcodes Ultimate DIV color

html,css,wordpress,shortcode
I use Wordpress and Shortcodes Ultimate, and I'm currently using a shortcode named "service". It displays a text, with a title and an icon. My purpose is to change the background color and the text color when the mouse is over the service area. I analyzed the HTML code of...

Add needed inner shortcode if missing

jquery,wordpress,shortcode
I have the following code: <textarea class="content"> [row] [col-md-12] text [/col-md-12] [/row] [row] text [/row] </textarea> Now I want to add the [col-md-12] inside (directly after) the [row] and close it before the [/row] with jquery. This should be the result: <textarea class="content"> [row] [col-md-12] text [/col-md-12] [/row] [row] [col-md-12]...

Modifying $post->post_content in WordPress

wordpress,filtering,shortcode
I'm using a template that seems to be outputting $post->post_content in the search page. I maintain a plugin that uses a non-standard shortcode format and I'm trying to find out how can I filter $post->post_content before it gets displayed because currently my shortcode is not getting covered (again, not using...

Shortcode inside a WordPress shortcode

php,jquery,wordpress,shortcode
Using the ultimate shortcodes plugin (the lightbox shortcode) and some custom styling I create pop-up frequently across my site. I as trying to simplify the use-case by including the shortcode and the custom styling within a custom shortcode. So for example This is the code that I need to type...

Wordpress issue with shortcodes

php,wordpress,shortcode
Asking for some help with setting the shortcode. I'm trying to figure out how to make my own plugin and add shortcode for fast use. So might be something wrong here. What i've got so far. I have working database table, which i can edit from the admin page from...

Shortcode default variables don't appear

php,wordpress,function,variables,shortcode
This is my code function myfunction ( $atts, $content = null ){ $atts = extract(shortcode_atts(array( 'limit' => 1, 'order' => 'ASC', 'columns' => '6' ),$atts)); ob_start(); include('php/blogcolumns.php'); $content = ob_get_clean(); return $content; } add_shortcode('blogcolumns','myfunction'); Problem is that default variables don't appear, only when they are added in shortcode, they appear....

p tag formatting in shortcode's content wordpress

php,wordpress,shortcode
I know this must have been asked a hundred times but I've been trying out a number of solutions I could find but none seem to work. I have a shortcode that wraps content: [important_note]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel velit at ex congue aliquet.[/important_note] I'm...

Wrong URL in [audio] WordPress shortcode

wordpress,audio,html5-audio,shortcode
I have a problem with WordPress Audio Shortcode. I used it like this: <?php echo do_shortcode('[audio mp3="http://whowillbethenextonline.com/audio/html5-audio-1.mp3" ogg="http://whowillbethenextonline.com/audio/html5-audio-1.ogg"]'); ?> but in front, in HTML code I got: <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]--> <audio class="wp-audio-shortcode" id="audio-362-1" preload="none" style="width: 100%; visibility: hidden;" controls="controls"> <source...

Remove frameborder in avada theme in youtube shortcode?

wordpress,themes,shortcode
i have using following shortcode. [youtube id="" width="" height="" autoplay="" api_params="" class=""] When i add this shortcode frameborder comes in iframe. i need to remove frameborder can anybody help me...