Site logo

[Resolved] add generatepress columns/grid to child template file

Home Forums Support [Resolved] add generatepress columns/grid to child template file

Home Forums Support add generatepress columns/grid to child template file

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2493026
    Tim

    Hi. I have a child theme, on which I have embedded a wp form. That works fine, but it’s 100% wide, so I wanted to add columns or a grid to the theme file. Following is a pseudo-code representation of what I’m trying to do. I don’t know what the html would be to leverage the GP grid:

     
    <?php echo do_shortcode(“[wpforms id=’200′]”); ?>
     
    #2493032
    Tim

    oh, your forum dropped my html. let me try again, using the codeblock:

    <div class="twentyfivepercent">&nbsp;</div>
    <div class="fiftypercent"><?php echo do_shortcode(“[wpforms id=’200′]”); ?></div>
    <div class="twentyfivepercent">&nbsp;</div>
    #2493148
    David
    Staff
    Customer Support

    Hi there,

    If you get stuck , share a link to where we can see it on your site and we will take a look

    #2511979
    Tim

    Thanks, David. I was doing some other stuff for a bit there, but I still have the issue. I’d like to make the form less wide, using code in a php template file. Below is a link to a page where the wide form is displayed and below that, is the page template code as-is.

    http://perischwartz.timthorp.com/artwork/bottles-jars-xxxvi-2014-22×36/

    	<div <?php generate_do_attr( 'content' ); ?>>
    		<main <?php generate_do_attr( 'main' ); ?>>
    			<div class="artwork">
    				<?php
    				/**
    				 * generate_before_main_content hook.
    				 *
    				 * @since 0.1
    				 */
    				do_action( 'generate_before_main_content' ); 
    			
    				if ( generate_has_default_loop() ) {
    					while ( have_posts() ) :
    
    						the_post();
    
    						generate_do_template_part( 'single' );
    
    					endwhile;
    				}
    				if (get_field('location') == 'NAGA'){
    					//naga form
    					echo "<h2>Inquire with the Schwartz Estate (text TBD)</h2>";
    					echo do_shortcode("[wpforms id='886']");
    				}else{
    					//general for sale form
    					echo "<h2>Inquire with Gallery NAGA (text TBD)</h2>";
    					echo do_shortcode("[wpforms id='200']");
    				}
    			
    				/**
    				 * generate_after_main_content hook.
    				 *
    				 * @since 0.1
    				 */
    				do_action( 'generate_after_main_content' );
    				?>
    			</div>
    		</main>
    	</div>
    
    #2512033
    David
    Staff
    Customer Support

    Can you confirm that URL ? as it is 404ing for me

    #2512181
    Tim

    Thanks. This is kinda odd, but for some reason the link works, except that somewhere, the “x” in the url is transformed into a shorter x. I’ll paste the link as code to see if it helps.

    http://perischwartz.timthorp.com/artwork/bottles-jars-xxxvi-2014-22x36/

    #2512182
    Tim

    just to double check if I can recreate the issue, I’ll paste the url here:

    http://perischwartz.timthorp.com/artwork/bottles-jars-xxxvi-2014-22×36/

    #2512254
    David
    Staff
    Customer Support

    How odd is that lol – i got there 🙂

    I would use some CSS like this:

    .artwork .wpforms-container {
        max-width: 600px;
    }
    #2512287
    Tim

    wow. that was easy! I gotta learn flex so that this makes more sense. Thanks, David!

    #2512808
    David
    Staff
    Customer Support

    You’re welcome

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.