Support » Fixing WordPress » if shortcode exists? some help writing / fixing this?

  • Hi Guys and Gals,

    Yes I have searched and got somewhat of an understanding but still a bit lost or I am searching for the wrong item.

    I have a template which includes rows and columns and grid style.
    What I want to do is the following in the LOOP for posting content (pages) ..
    Can you tell me if this is even doable in the loop?

    this is my thought…

    if post has shortcode column
    then add a new row and whatever the column is selected from the short code (example 1/3 + 1/3 + 1/3 )


    just continue normally with the template style which is

    div row
    and div column 4 or whatever

    I have the following but if someone could help me out?

    If (shortcode_column_exists) {
      echo '<div class="row">'
    would the wordpress loop also go in here?
      echo do_shortcode('[gallery]');
      echo '</div>'
    else {
    <div class="row">
    <div class="span1">
    the loop 
    }end if; }

    I know i probably have a few 100 mistakes but if i could get some help.. it would be great appreciated ..

    Unless this is a stupid idea i could just use nested shortcode columns but i am not sure how that would look

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘if shortcode exists? some help writing / fixing this?’ is closed to new replies.