Forum Replies Created

Viewing 15 replies - 31 through 45 (of 58 total)
  • Thread Starter david221

    (@david221)

    I changed the code, but it hides my entire footer instead.

    Thread Starter david221

    (@david221)

    Thanks for your reply.

    I’ve written the code in my functions.php file, so a link appears in the home page’s footer area. This is what I’ve done so far.

    if ( !function_exists( 'skeleton_footer_credits' ) ) {
    	function skeleton_footer_credits() {
    		$footer_extras = skeleton_options('footer_extras');
                   $extras .= '<blockquote><a href="#newsletter-pop" class="fancybox">Receive our newsletter</a>';
    		$extras .= '<div style="display:none;" class="fancybox-hidden">';
    		[B]$extras .= '<div id="newsletter-pop">[gravityform id="1" name="Newsletter"]</div>';[/B]
    		$extras .= '</div></blockquote>';
    
                    echo apply_filters('skeleton_author_credits',$extras);
           }
    add_action('skeleton_footer', 'skeleton_footer_credits',4);
    }

    The code isn’t working properly because the php file doesn’t seem to accept the code I’ve bolded.

    Would you know what I should do?

    Thread Starter david221

    (@david221)

    Forget it, I solved it! This is how (I should mention that I’m using Skeleton Theme):

    /*———————————————————————————–*/
    /* Navigation Hook (skeleton_navbar)
    /*———————————————————————————–*/

    if ( !function_exists( ‘skeleton_main_menu’ ) ) {

    function skeleton_main_menu() {
    echo ‘<div id=”navigation” class=”row sixteen columns”>’;
    wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’));
    echo ‘<div class=”linkedin-header”><script src=”//platform.linkedin.com/in.js” type=”text/javascript”>lang: en_US</script><script type=”IN/FollowCompany” data-id=”98787″ data-counter=”top”></script></div>’;
    echo ‘</div><!–/#navigation–>’;
    echo ‘</div><!–/.maxwidth–>’;
    }

    add_action(‘skeleton_navbar’,’skeleton_main_menu’, 1);

    }

    Thread Starter david221

    (@david221)

    Thanks, I just worked it out! ??

    Thread Starter david221

    (@david221)

    I solved it!

    I copied the loop.php file from my original theme folder and put it into my child theme folder. I added these lines of code to get the information I wanted to display on the news index:

    <?php /* How to display all other posts. */ ?>
    <?php else : ?>
    <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <!– embeds the link of the post together with the article’s title –>
    <h2 class=”entry-title”>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘smpl’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”><?php the_title(); ?></h2>
    <!– added the date of when the article is published, in this case month and year–>
    <div class=”date”><?php the_time(‘F, Y’) ?></div>
    <!– below is a link that takes you to the article once it’s clicked –>
    <span class=”meta-nav”>“>Read more</span>
    <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

    Thanks… :/

    Thread Starter david221

    (@david221)

    I worked it out:

    /*———————————————————————————–*/
    // Opening #header
    /*———————————————————————————–*/

    if ( !function_exists( ‘skeleton_header_open’ ) ) {

    function skeleton_header_open() {
    if( is_front_page() ) {
    echo do_shortcode( ‘[metaslider id=”21″]’ );
    }
    echo “<div id=\”header\” class=\”sixteen columns\”>\n<div class=\”inner\”>\n<div class=\”container\”>\n”;
    }
    add_action(‘skeleton_header’,’skeleton_header_open’, 2);

    }

    Thread Starter david221

    (@david221)

    I got it half working. This is what I’ve added in my functions.php page:

    /*———————————————————————————–*/
    // Opening #header
    /*———————————————————————————–*/

    if ( !function_exists( ‘skeleton_header_open’ ) ) {

    function skeleton_header_open() {
    echo “<div id=\”wrap\” class=\”container\”>”;
    echo do_shortcode(“[metaslider id=21 percentwidth=100 restrict_to=home]”);
    echo “<div id=\”header\” class=\”sixteen columns\”>\n<div class=\”inner\”>\n”;
    }
    add_action(‘skeleton_header’,’skeleton_header_open’, 2);

    }

    It’s slightly bigger than usual, but it’s still not at 100%.

    Thread Starter david221

    (@david221)

    Actually, I figured it out. I made the mistake of writing (‘../fonts/ instead of (‘fonts/. e.g:

    @font-face {
    font-family: ‘museo_sans500’;
    src: url(‘fonts/museosans-500-webfont.eot’);
    src: url(‘fonts/museosans-500-webfont.eot?#iefix’) format(’embedded-opentype’),
    url(‘fonts/museosans-500-webfont.woff2’) format(‘woff2’),
    url(‘fonts/museosans-500-webfont.woff’) format(‘woff’),
    url(‘fonts/museosans-500-webfont.ttf’) format(‘truetype’),
    url(‘fonts/museosans-500-webfont.svg#museo_sans500’) format(‘svg’);
    font-weight: normal;
    font-style: normal;
    }

    Thread Starter david221

    (@david221)

    Hi Voodoogrrl,

    I have worked out my problem. I went to Customize > Appearances and set my website to be 1200px wide under the Layout section, and set the number of columns to sixteen i.e. sidebar width = 5 columns and content width = 11.

    I had no idea how to organize my web page correctly until I realized that I had to set the number of columns to sixteen in the functions.php if the content is equal to a single page.

    //
    if ( !function_exists( ‘st_before_content’ ) ) {
    global $post;
    function st_before_content($columns) {

    //Sets container up to sixteen columns for all web pages
    if (is_page() && !is_active_sidebar(‘secondary-widget-area’)) {
    $columns = ‘sixteen’;
    }
    }
    }

    I hope that helps. ??

    Thread Starter david221

    (@david221)

    I worked it out! All I had to do is go to the functions.php page and set the number of columns to eleven if content is equal to single post.

    if ( !function_exists( ‘st_before_content’ ) ) {
    global $post;
    function st_before_content($columns) {

    //Sets container up to eleven columns for all blog entries
    if (is_single() && !is_active_sidebar(‘primary-widget-area’)) {
    $columns = ‘eleven’;
    }
    }
    }

    Thanks…:/

    Thread Starter david221

    (@david221)

    At the moment, I’ve done this in my CSS to get what I want.

    .post.single p {
    		width: 760px;
    		margin-bottom: 20px;
    
    }

    But I don’t believe this is the right way to do it.

    Thread Starter david221

    (@david221)

    Thank you for letting me know. I’ll check out that link right now.

    Thread Starter david221

    (@david221)

    I’ve made a bit of progress. I created a sidebar-footer PHP file and organized the code by adding “googleMap” as a div id element to make space
    that is stretches across the screen.

    The only problem is my map won’t appear. :/

    <?php
    /**
     * Footer widget areas.
     *
     * @package WordPress
     * @subpackage skeleton
     * @since skeleton 0.1
     */
    
    // count the active widgets to determine column sizes
    $footerwidgets = is_active_sidebar('footer-widget-area-1') + is_active_sidebar('footer-widget-area-2') + is_active_sidebar('footer-widget-area-3') + is_active_sidebar('footer-widget-area-4');
    // default
    $footergrid = "one_fourth";
    // if only one
    if ($footerwidgets == "1") {
    $footergrid = "googleMap";
    // if two, split in half
    } elseif ($footerwidgets == "2") {
    $footergrid = "one_half";
    // if three, divide in thirds
    } elseif ($footerwidgets == "3") {
    $footergrid = "one_third";
    // if four, split in fourths
    } elseif ($footerwidgets == "4") {
    $footergrid = "one_fourth";
    }
    
    ?>
    
    <?php if ($footerwidgets) : ?>
    
    <?php if (is_active_sidebar('footer-widget-area-1')) : ?>
    <div class="<?php echo $footergrid;?>">
    	<?php dynamic_sidebar('footer-widget-area-1'); ?>
    </div>
    <?php endif;?>
    
    <?php if (is_active_sidebar('footer-widget-area-2')) : $last = ($footerwidgets == '2' ? ' last' : false);?>
    <div class="<?php echo $footergrid.$last;?>">
    	  <?php dynamic_sidebar('footer-widget-area-2'); ?>
    </div>
    <?php endif;?>
    
    <?php if (is_active_sidebar('footer-widget-area-3')) : $last = ($footerwidgets == '3' ? ' last' : false);?>
    <div class="<?php echo $footergrid.$last;?> last">
    	  <?php dynamic_sidebar('footer-widget-area-3'); ?>
    </div>
    <?php endif;?>
    
    <div class="clear"></div>
    
    </div>
    </div>
    
    <?php if (is_active_sidebar('footer-widget-area-4')) : $last = ($footerwidgets == '4' ? ' last' : false);?>
    <div class="full-width">
    		  <?php dynamic_sidebar('footer-widget-area-4'); ?>
    </div>
    <?php endif;?>
    
    <div class="sixteen columns container">
    
    <?php endif;?>
    Thread Starter david221

    (@david221)

    I figured it out.

    The blocks had to be referred to a template page. For example:

    get_header();
    st_before_content($columns=”);
    get_template_part( ‘loop’, ‘page’ );
    st_after_content();

    get_the_block(‘Block Name’);
    ?>

    <div class=”pageStretch” id=”company”>
    <div class=”container sixteen columns”>
    <?php the_block(‘Block Name’); ?>
    </div>
    </div>

    I also had to careful refer to the hook commands to make the content blocks appear on the editing page.

    Thank…;/

    Thread Starter david221

    (@david221)

    I just found out the blocks are inactive. I went to Settings > Multiple content blocks and clicked ‘Show inactive blocks’, and the content is there, but I can’t activate them?

    Thoughts?

Viewing 15 replies - 31 through 45 (of 58 total)