• I am using this plugin nuvuglide is a third party woocommerce plugin. I want to hard code it on the home page this is the code that the plugin author says to use

    ‘<?php do_shortcode(‘[nuvuglide type=”post” order=”ASC” order_by=’name’ show_excerpt=”true” show_date=”true” show_title=”true” show_gallery=”true” num_images=”4″ ]’); ?>’

    i get this error Parse error: syntax error, unexpected T_STRING in /home/bessobar/public_html/veeandjade.com/wp-content/themes/mystile-child/index.php on line 36

    I’ve tried

    ‘<?php echo do_shortcode(‘[nuvuglide type=”post” order=”ASC” order_by=’name’ show_excerpt=”true” show_date=”true” show_title=”true” show_gallery=”true” num_images=”4″ ]’); ?>’

    I tried double quotes instead of single and it doesn’t seem to make a difference.

    I’ve also tried

    ‘echo apply_filters( ‘the_content’,’ [nuvuglide] ‘);’

    none of which works.

    Any ideas where I could be going wrong please

Viewing 4 replies - 1 through 4 (of 4 total)
  • change these quotes to double quotes:

    order_by='name'

    if this does not help:

    – generally, make sure not to violate any php syntax.
    – please post the code in the context of the full template; use the pastebin https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    Thread Starter amobaroti

    (@amobaroti)

    I though I did that and got an error, but what do you know I did it again and it’s work.

    cheers

    Thread Starter amobaroti

    (@amobaroti)

    Well it’s working using this code

    ‘ <?php do_shortcode(‘[nuvuglide type=”post” order=”ASC” order_by=”name” show_excerpt=”true” show_date=”true” show_title=”true” show_gallery=”true” num_images=”4″ ]’); ?>’

    It does not work if you use “echo” or have double quotes around the short code and args.

    Thread Starter amobaroti

    (@amobaroti)

    noted re: pastebin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘php do_shortcode’ is closed to new replies.