shortcode

Output a shortcode inside an echo for wordpress

I am trying to write a shortcode that has another shortcode nested inside of it. The [map id=”1″] shortcode is being generated from a different plugin but I want to have the map display when I execute this shortcode. I don’t think this is the best way to go about this but I am still new to php coding. <?php…
Read more

Adding ‘sort by’ drop down on custom page using woocommerce short code

I have created a custom page using woocommerce short code for product categories. At the moment, it’s pretty sparse as I’ve only just started on the new site. I just need the default ‘sort by’ drop down element adding but have no idea how to do it. I found some code here >>Woocommerce, sort dropdown on shortcode based product lists…
Read more

How can I display the category name on [recent_products] WooCommerce shortcode?

I am trying to grab the category name of recent products in WooCommerce. I am using [recent_products per_page=”12″ columns=”4″] The Recent Products code is in class-wc-shortcodes.php public static function recent_products( $atts ) { $atts = shortcode_atts( array( ‘per_page’ => ’12’, ‘columns’ => ‘4’, ‘orderby’ => ‘date’, ‘order’ => ‘desc’ ), $atts ); $query_args = array( ‘post_type’ => ‘product’, ‘post_status’ =>…
Read more

How to create shortcodes like tinyMCE with icons in wordpress backend and get them working on page

I wanted to create a shorcodes like tinyMCE with little descriptive icons. For example, if I click on column icon it will generate column shortcode inside content editor for me. I know there are many plugins out there like Ultimate shortcode which does the job properly, but it gives much more options. Is there any proper way to get this…
Read more

adjusting wordpress [tag] shortcode height

the code i used on the staging server and the result was great as http://islandparkrent.staging.wpengine.com/island-park-attractions/ but as i copied the code on live sever, the height doesnot fit as on the staging page. the link for live site is http://www.islandparkrentals.com/island-park-attractions/ , the part of the code is given below:- [tab] [singlepic id=126 w=719 h=232 float=center] <a title=”Wild West Whitewater Rafting”…
Read more

How i can generate short code of my post

Here is my custom post code can anybody guide me how I can get its short code actually I want to call on my home page which I am using avada theme and avada theme using “Fusion Builer” how I can show my home page ?? // In “function.php” // Testimonial Custom Post add_action( ‘init’, ‘create_testimonial’ ); function create_testimonial() {…
Read more

do_shortcode function does not work outside wordpress?

When i try to run shortcode by this code: define( ‘WP_USE_THEMES’, false ); require_once(‘account/wp-blog-header.php’); require_once(‘account/wp-includes/shortcodes.php’); global $current_user; get_currentuserinfo(); print_r($current_user); get_header(); $page_object = get_page( 28 ); var_dump($page_object); echo do_shortcode($page_object->post_content); I get page with only header, so do_shortcode didn’t work. Dump of page_object returns me this: object(WP_Post)[276] public ‘ID’ => int 28 public ‘post_author’ => string ‘1’ (length=1) public ‘post_date’ => string…
Read more

WordPress Shortcode Auto-P Issue

I am new to WordPress and am implementing a shortcode. My shortcode is super simple and the expected output is HTML5-compliant: add_shortcode( ‘my_code’, function( $attributes ){ return ‘<a href=”#”><div></div></a>’; }); When this gets emitted, I get the following HTML: <a href=”#”> <div></div> <p></a> As you can see, there appears to be auto formatting going on. I have followed the advice…
Read more

Visual Composer custom shortcode template – custom_markup display user input

I have created some shortcode elements. Now I want to customize the look of the elements in the backend editor. From the description of the wiki of VC-Pagebuilder, I get out that I can use the “custom_markup” param for this. For simple html it works fine. But I can not display the user input in the shortcode backend element. <?php…
Read more

WooCommerce related_products shortcode – sorting by menu_order

I am using the WooCommerce related_products shortcode on my website, but can’t influence the order of the items. Usually, you can define the menu order in the settings of each product. Then you put the argument in the shortcode like this: [related_products orderby=”menu_order”] But the the menu_order argument doesn’t work here. What can I do? Source: shortcode