shortcode

Creating a custom WordPress Shortcode with 2 arrays

I’m trying to created a custom shortcode in wordpress but I can’t get it working. Here’s the code I have so far: function wp_test_video($atts) { extract(shortcode_atts(array( ‘X’ => ” ‘Y’ => ” ), $atts)); return ‘[iframe src=”http://www.example.com/test.php?X=’.$atts[‘X’].’&Y=’.$atts[‘Y’].'”]’; } add_shortcode(‘test’, ‘wp_test_video’); Everytime I try and insert it into my functions.php file my site just breaks. Source: shortcode

What Code is this ??? {{phrase.addAdministrator}} [on hold]

i have come across an application which contains this type of code i don’t understand What {{phrase.addAdministrator}} is and where is it coming from ?? <section class=”content” ng-show=”views.list”><a ng-click=”changeView(‘add’)” class=”floatRTL btn btn-success btn-flat pull-right marginBottom15″>{{phrase.addAdministrator}}</a> <div class=”box col-xs-12″> <div class=”box-header”> <h3 class=”box-title”>{{phrase.listAdministrators}}</h3> <div class=”box-tools”> <div class=”input-group”> <input type=”text” name=”table_search” ng-model=”searchText” class=”form-control input-sm pull-right” style=”width: 150px;” placeholder=”{{phrase.Search}}”> <div class=”input-group-btn”> <button class=”btn…
Read more

advice balancing columns in a wordpress page. alignment issues

i built a page to display content using columns stacked on top of each other (with shortcodes) [su_column] content [/su_column] [su_column] content [/su_column] [su_column] content [/su_column] <p> content </p> [su_column] content [/su_column] [su_column] content [/su_column] [su_column] content [/su_column] <p> content </p> [su_column] content [/su_column] [su_column] content [/su_column] [su_column] content [/su_column] <p> content </p> the issue i’m having is that the…
Read more

integrating twitter feed into a shortcode for wordpress

I’m trying to create a simple shortcode for wordpress that has the following variables: – username – no_of_tweets So a user could write [twitter_feed username=”USERNAME” no_of_tweets=”5″] and it displays a list of 5 of their latest tweets. I have been using a plugin called Twitter Feed for developers – it does all the oAuth stuff and the idea is that…
Read more

How to display recent posts by category name in WordPress using shortcode

I want to show the recent posts by category name using shortcode like: [recent-posts posts=”10″ category=”thecategoryname”] My code below display the recent posts but I don’t know how to display them by category in shortcode in the format above. function recent_posts_function($atts){ extract(shortcode_atts(array( ‘posts’ => 1, ), $atts)); $return_string = ‘<ul>’; query_posts(array(‘orderby’ => ‘date’, ‘order’ => ‘DESC’ , ‘showposts’ => $posts));…
Read more

How to add shortcode to custom text on first page block

I would like to add shortcode to my homepage test.healthclubone.nl. In the dashboard is the ‘custom text first page’ available. The shortcode needs to be between the header and the widget. However, the shortcode is seen as text and not as HTML. Is there a possibility to change this? I played around with do_shortcode but this is not working. Thanks…
Read more

in wordpress how to add to attribute(s) to an existing shortcode

Here is example shortcode: add_shortcode(“sc_one”,”test_fn”); function test_fn(){ $attr = array(‘one’=>1,’two’=>2,’three’=>3); echo “attribute 1: “.$attr[‘one’] .” attribute 2: “.$attr[‘two’].” attribute 3: “.$attr[“three”]; } And here is the function where I’d like to add attributes to shortcode “sc_one” function add_to_sc_one(){ $more_attributes = array(“four”=>4,”five”=>5); // code to add attributes to “sc_one” shortcode. } I”m just curious if its possible to modify an existing…
Read more