This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: 

Shortcode variable

  • Creator
    Topic
  • #11182
    menardmam
    Participant

    OK, after getting around the shortcode plugin and the template files…. i must say, everything is well organise and work fine. Wich get me back to the simple file content-grid.php that i will duplicate in my child theme to make it do what i need (pick an image link from the custom field.

    So the question…. is it possible, in the file content-grid.php to get the variable from the shortcode that create this file. I will just add one variable to my shortcode.. something like : [post_grid columns=”4″ rows=”99″ categories=”piscine” order=”ASC” offset=”0″ link=”true” link_target=”_self” image=”true”]. so when image is true, take the image link in the custom field, if false, take the feature image. So i need the way to access attribute send to the shortcode in the php file… how do i do that ? or is it possible ?

    thanks in advance, your support ROCK !

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #11198
    Jason Bobich
    Keymaster

    I’m not sure how you’d work that into the specific [post_grid] shortcode without just creating your own shortcode instead. You could just check for the custom field in content-grid.php, and then if it exists, use it.

Viewing 1 replies (of 1 total)
  • The forum ‘Barely Corporate Responsive WordPress Theme’ is closed to new topics and replies.