SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need some help with wordpress...

    Hello, can you guys help me with some questions below pertaining to http://www.terrywestbuilders.com?

    Question 1:

    Is it possible to align LEFT the text on the Call to Action page (landing page), in the center, to the left of the large graphic?

    Question 2:

    Is it possible to drop in a line of shortcode (to display an image slider) below the main text and main graphic, on the landing page?

  2. #2
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,821
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    The first question can be done with CSS. Add this to the bottom of your style sheet.
    if you still want the headlines centered, DONT add the part in orange.

    #featured p, #featured h1, #featured h2 { text-align:left; }

    The second question is both a PHP and a logic question. but the answer is YES. You'd need to do it the appropriate .php file for your theme ( theme are found in the wp-content folder). where and how would depend on the them , how it was coded, and how the slider was coded.

    NOTE. if your theme came 'widgetized' you can see if it is by going to (widgets in the dashboard) and there is a widget area for the location you want , and your slider comes in the form of a widget... you may actually be able to just place the slider widget into that area.. no coding required. This however would be the case for very specified themes designed for having widgets , and having an area for widgets ready at that location.

    BTW, I am moving this post to the WP .. you may get more in depth help there about WP theme /php programming.

  3. #3
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The area is not widgetized. It is the default Call to Action page for the Responsive Theme. So I cannot go below the text and graphic area easily. Suggestions on how to manually add a shortcode below the text and graphic?

    New questions, I just added the Colophon widget toward the bottom of my page and the background is transparent. Know how to fix that?

  4. #4
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Scratch the last question on the Colophon widget. I figured that out. I just need to figure out how to drop a slider widget or shortcode into the front page now, below the text and graphics, but above the 3 horizontal widgets.

  5. #5
    SitePoint Member
    Join Date
    Sep 2013
    Location
    Guelph, Ontario, Canada
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    install an extension for WP-slider, there are tons to find for free. Make a widget. Place the widget in your 'feature1 or feature2 position) basically a spot with the same width as feature with class .grid col-940.
    If you now have used your feature-layout-position twice, make sure you position the widget in the correct order so they will show up the way you want.

  6. #6
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cannot do that. I only have control over Home Widget 1 2 and 3 at the bottom. I can enter text in, but it will not accept shortcode or any code in that center body area. This has to be coded in manually. Has anyone worked with this Responsive theme? I thought hundreds had played with this already.

  7. #7
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the area grid col-940 in my front-page.php, but when I place [promoslider] there it just shows the text, like it does on the page now:

    terrywestbuilders.com

    Suggestions on how to get the code to work when I drop it in the page?

  8. #8
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Folks I could still really use some help on this. I have added code for an image rotator on the main page of this site - http://terrywestbuilders.com. However, it is right aligned, the image of the helmet, and I need it to be aligned to the center. It seems like it is trapped in a right side column or something. Is it possible to get it in its own field and center it? Please advise.

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,321
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    It's stuck inside this div:

    Code:
    <div id="featured-image" class="grid col-460 fit">
    
    </div>
    That div is about 46% wide, and is floated next to the left div.

  10. #10
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the complete code for the page below:

    Also, the code for the promo slider is here:

    <div id="promoslider" class="aligncenter">
    <?php echo do_shortcode('[promoslider]') ?>
    </div>

    Where should I put that in the code below to get it out of that div and how can I center it?



    <?php

    // Exit if accessed directly
    if ( !defined('ABSPATH')) exit;

    /**
    * Site Front Page
    *
    * Note: You can overwrite front-page.php as well as any other Template in Child Theme.
    * Create the same file (name) include in /responsive-child-theme/ and you're all set to go!
    * @see http://codex.wordpress.org/Child_Themes and
    * http://themeid.com/forum/topic/505/child-theme-example/
    *
    * @file front-page.php
    * @package Responsive
    * @author Emil Uzelac
    * @copyright 2003 - 2013 ThemeID
    * @license license.txt
    * @version Release: 1.0
    * @filesource wp-content/themes/responsive/front-page.php
    * @link http://codex.wordpress.org/Template_Hierarchy
    * @since available since Release 1.0
    */

    /**
    * Globalize Theme Options
    */
    $responsive_options = responsive_get_options();
    /**
    * If front page is set to display the
    * blog posts index, include home.php;
    * otherwise, display static front page
    * content
    */
    if ( 'posts' == get_option( 'show_on_front' ) && $responsive_options['front_page'] != 1 ) {
    get_template_part( 'home' );
    } elseif ( 'page' == get_option( 'show_on_front' ) && $responsive_options['front_page'] != 1 ) {
    $template = get_post_meta( get_option( 'page_on_front' ), '_wp_page_template', true );
    $template = ( $template == 'default' ) ? 'index.php' : $template;
    locate_template( $template, true );
    } else {

    get_header();

    //test for first install no database
    $db = get_option( 'responsive_theme_options' );
    //test if all options are empty so we can display default text if they are
    $empty = ( empty( $responsive_options['home_headline'] ) && empty( $responsive_options['home_subheadline'] ) && empty( $responsive_options['home_content_area'] ) ) ? false : true;
    ?>

    <div id="featured" class="grid col-940">

    <div class="grid col-460">

    <h1 class="featured-title">
    <?php
    if ( isset( $responsive_options['home_headline'] ) && $db && $empty )
    echo $responsive_options['home_headline'];
    else
    _e( 'Hello, World!', 'responsive' );
    ?>
    </h1>

    <h2 class="featured-subtitle">
    <?php
    if ( isset( $responsive_options['home_subheadline'] ) && $db && $empty )
    echo $responsive_options['home_subheadline'];
    else
    _e( 'Your H2 subheadline here', 'responsive' );
    ?>

    </h2>


    <p>
    <?php

    if ( isset( $responsive_options['home_content_area'] ) && $db && $empty )
    echo do_shortcode( $responsive_options['home_content_area'] );
    else
    _e( 'Your title, subtitle and this very content is editable from Theme Option. Call to Action button and its destination link as well. Image on your right can be an image or even YouTube video if you like.','responsive' );
    ?>
    </p>

    <?php if ($responsive_options['cta_button'] == 0): ?>

    <div class="call-to-action">

    <a href="<?php echo $responsive_options['cta_url']; ?>" class="blue button">
    <?php
    if( isset( $responsive_options['cta_text'] ) && $db )
    echo $responsive_options['cta_text'];
    else
    _e('Call to Action','responsive');
    ?>
    </a>

    </div><!-- end of .call-to-action -->

    <?php endif; ?>

    </div><!-- end of .col-460 -->

    <div id="featured-image" class="grid col-460 fit">

    <?php $featured_content = ( !empty( $responsive_options['featured_content'] ) ) ? $responsive_options['featured_content'] : '<img class="aligncenter" src="' . get_template_directory_uri() . '/core/images/featured-image.png" width="440" height="300" alt="" />'; ?>

    <?php echo do_shortcode( $featured_content ); ?>

    <div id="promoslider" class="aligncenter">
    <?php echo do_shortcode('[promoslider]') ?>
    </div>


    </div><!-- end of #featured-image -->

    </div><!-- end of #featured -->

    <?php
    get_sidebar('home');
    get_footer();
    }
    ?>

  11. #11
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,321
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    It needs to go in between these two bits:

    Code:
    </div><!-- end of #featured-image -->
    
    </div><!-- end of #featured -->
    E.g.

    Code:
    </div><!-- end of #featured-image -->
    <div id="promoslider" class="aligncenter">
    <?php echo do_shortcode('[promoslider]') ?>
    </div>
    </div><!-- end of #featured -->
    It may need some further styling, but that's the first step, anyhow.

  12. #12
    SitePoint Addict sdamos's Avatar
    Join Date
    Sep 2003
    Location
    Arizona
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I did as recommended, but now the promo slider does not show up. The single image I had loaded, with the hardhat, vanished. See code below, recommended next steps?

    Code:
    <?php
    
    // Exit if accessed directly
    if ( !defined('ABSPATH')) exit;
    
    /**
     * Site Front Page
     *
     * Note: You can overwrite front-page.php as well as any other Template in Child Theme.
     * Create the same file (name) include in /responsive-child-theme/ and you're all set to go!
     * @see            http://codex.wordpress.org/Child_Themes and
     *                 http://themeid.com/forum/topic/505/child-theme-example/
     *
     * @file           front-page.php
     * @package        Responsive 
     * @author         Emil Uzelac 
     * @copyright      2003 - 2013 ThemeID
     * @license        license.txt
     * @version        Release: 1.0
     * @filesource     wp-content/themes/responsive/front-page.php
     * @link           http://codex.wordpress.org/Template_Hierarchy
     * @since          available since Release 1.0
     */
    
    /**
     * Globalize Theme Options
     */
    $responsive_options = responsive_get_options();
    /**
     * If front page is set to display the
     * blog posts index, include home.php;
     * otherwise, display static front page
     * content
     */
    if ( 'posts' == get_option( 'show_on_front' ) && $responsive_options['front_page'] != 1 ) {
    	get_template_part( 'home' );
    } elseif ( 'page' == get_option( 'show_on_front' ) && $responsive_options['front_page'] != 1 ) {
    	$template = get_post_meta( get_option( 'page_on_front' ), '_wp_page_template', true );
    	$template = ( $template == 'default' ) ? 'index.php' : $template;
    	locate_template( $template, true );
    } else { 
    
    	get_header();
    	
    	//test for first install no database
    	$db = get_option( 'responsive_theme_options' );
        //test if all options are empty so we can display default text if they are
        $empty = ( empty( $responsive_options['home_headline'] ) && empty( $responsive_options['home_subheadline'] ) && empty( $responsive_options['home_content_area'] ) ) ? false : true;
    	?>
    
    	<div id="featured" class="grid col-940">
    	
    		<div class="grid col-460">
    
    			<h1 class="featured-title">
    				<?php
    				if ( isset( $responsive_options['home_headline'] ) && $db && $empty )
    					echo $responsive_options['home_headline'];
    				else
    					_e( 'Hello, World!', 'responsive' );
    				?>
    			</h1>
    
    <h2 class="featured-subtitle">
    				<?php
    				if ( isset( $responsive_options['home_subheadline'] ) && $db && $empty )
    					echo $responsive_options['home_subheadline'];
    				else
    					_e( 'Your H2 subheadline here', 'responsive' );
    				?>
    
    				</h2>
    
    								
    			<p>
    				<?php
    
    			if ( isset( $responsive_options['home_content_area'] ) && $db && $empty )
    					echo do_shortcode( $responsive_options['home_content_area'] );
    				else
    					_e( 'Your title, subtitle and this very content is editable from Theme Option. Call to Action button and its destination link as well. Image on your right can be an image or even YouTube video if you like.','responsive' );
    				?>
    			</p>
    			
    			<?php if ($responsive_options['cta_button'] == 0): ?>  
       
    				<div class="call-to-action">
    
    					<a href="<?php echo $responsive_options['cta_url']; ?>" class="blue button">
    						<?php 
    						if( isset( $responsive_options['cta_text'] ) && $db )
    							echo $responsive_options['cta_text']; 
    						else
    							_e('Call to Action','responsive');
    						?>
    					</a>
    				
    				</div><!-- end of .call-to-action -->
    
    			<?php endif; ?>         
    			
    		</div><!-- end of .col-460 -->
    
    		<div id="featured-image" class="grid col-460 fit">
    		  
    		  <?php $featured_content = ( !empty( $responsive_options['featured_content'] ) ) ? $responsive_options['featured_content'] : '<img class="aligncenter" src="' . get_template_directory_uri() . '/core/images/featured-image.png" width="440" height="300" alt="" />'; ?>
    							
    			<?php echo do_shortcode( $featured_content ); ?>
    									
    </div><!-- end of #featured-image -->
    
    <div id="promoslider" class="aligncenter">
    <?php echo do_shortcode('[promoslider]') ?>
    </div>
    
    </div><!-- end of #featured -->
    	
    <?php 
    	get_sidebar('home');
    	get_footer(); 
    }
    ?>

    Quote Originally Posted by ralph.m View Post
    It needs to go in between these two bits:

    Code:
    </div><!-- end of #featured-image -->
    
    </div><!-- end of #featured -->
    E.g.

    Code:
    </div><!-- end of #featured-image -->
    <div id="promoslider" class="aligncenter">
    <?php echo do_shortcode('[promoslider]') ?>
    </div>
    </div><!-- end of #featured -->
    It may need some further styling, but that's the first step, anyhow.

  13. #13
    SitePoint Member
    Join Date
    Sep 2013
    Location
    Guelph, Ontario, Canada
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's crappy to say after so much hours of work but I recommend to start again with your template.
    You are using WordPress so there are 1000's of promo/image/video/content sliders around.
    You are now digging around in the code which you don't really know.
    In order to fix your problem it needs to be looked at from the back-end of your site to see where you go wrong.

    WP is convenient for the beginner because of all the handy plugins, try to utilize them instead of coding it by hand.
    This is taken you so long now, while it should be up and running a week ago.

    Here are some free responsive templates, http://www.designrazzi.com/2013/free-wordpress-themes/
    Use the demo content for your images and just overwrite everything so you don't have to do much handcoding

  14. #14
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,321
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by sdamos View Post
    now the promo slider does not show up.
    It is there, but as I said, it might need some styling. Add this to your styles:

    Code:
    #promoslider {clear: both;}
    
    .promo_slider {width: 418px; margin: 0 auto;}


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •