WordPress.org

Ready to get started?Download WordPress

Forums

if shortcode exists? some help writing / fixing this? (2 posts)

  1. op1001
    Member
    Posted 9 months ago #

    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 )

    else

    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 
    
    </div>
    </div>
    
    }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

  2. Robin W
    Member
    Posted 8 months ago #

    in the absence of other responses try

    http://jobs.wordpress.net/

    You can put very specific stuff on there and get a quote to fix

Reply

You must log in to post.

About this Topic