Forum Replies Created

Viewing 15 replies - 16 through 30 (of 67 total)
  • Thread Starter dequecolour

    (@dequecolour)

    To answer your first question, “does your Twenty Twelve child theme use any custom queries in the home page template?” yes, I think so. To create the two columns, this is my index.php code for the child theme.

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * For example, it puts together the home page when no home.php file exists.
     *
     * Learn more: https://codex.www.ads-software.com/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    get_header(); ?>
    	<div id="primary" class="site-content">
    	<div id="content" role="main">
            <div style="margin-bottom: 20px;">
    <center> <?php if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '1420' ); ?>
    <br><br><br><br><br><br><br><br><br>
    <center>
    <img src="https://dev.travelwithcastle.com/wp-content/uploads/2013/08/RF1.jpg">
    </div>
    <div id="right-column">
    <?php $my_query = new WP_Query('category_name=favorites');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate[] = $post->ID ?>
      <?php get_template_part( 'content', get_post_format() ); ?>
      <?php endwhile; ?>
    </div>
    <div id="left-column">
    <?php $my_query = new WP_Query('category_name=Recents');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate[] = $post->ID ?>
      <?php get_template_part( 'content', get_post_format() ); ?>
      <?php endwhile; ?>
    </div>
    			<?php twentytwelve_content_nav( 'nav-below' ); ?>
    		</div><!-- #content -->
    	</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Thread Starter dequecolour

    (@dequecolour)

    thx — i will try the above questions and report back.

    the site is dev.travelwithcastle.com

    the 2010 site you visited did not included the “dev.” because i accidentally typed an unneeded space up above in my first hyperlink to the site. So, just to clarify it’s self-hosted at dev.travelwithcastle.com. You will see it is a twentytwelve child.

    Thread Starter dequecolour

    (@dequecolour)

    Can you elaborate? This is a twenty twelve child theme. If I change to twenty thirteen, do you want me to use the same child files I’ve created? I’ll do whatever you think I need to do to resolve the issue, but I’m a little unclear on what you need.

    Thread Starter dequecolour

    (@dequecolour)

    Thank you. that worked!

    I am looking at the CSS for a similar question now.

    if you look at my site:
    internalcompass.us/castle

    I want to have the header and the content take up all of the white space from left to right (so that the white space margin is much thinner or gone entirely) so the header can expand more than 960 pixels to occupy most of the white space & the black background can serve as the frame — Can I do that?

    Thread Starter dequecolour

    (@dequecolour)

    i resolved this with this support information in case anyone encounters a similar issue:

    https://wordpress.stackexchange.com/questions/108215/links-to-posts-not-working-on-homepage

    thanks!

    Thread Starter dequecolour

    (@dequecolour)

    pretty sure the code i want to add is:

    <h1 class="entry-title">
        <a>" rel="bookmark"><?php the_title(); ?></a>
    </h1>

    but when i add that exactly, the titles show twice and the ones with the dates don’t link. so that’s where i’m at

    Thread Starter dequecolour

    (@dequecolour)

    sure thing. let me know if this isn’t the correct way to share pastebin.
    (i’ve actually had others ask me NOT to post pastebin links on support sites?!)

    here is content.php

    https://pastebin.com/PZZLe8Bk

    here is index.php

    https://pastebin.com/2SvEgEwb

    i have not added anything to functions.php — it’s just sourcing the twentytwelve base file

    thank you!

    Thread Starter dequecolour

    (@dequecolour)

    @krishna, yes, the homepage links to my posts do work if i switch from my child theme back to twenty twelve. however, my child theme is pretty customized, so the homepage, for example, does not even have two columns if i switch to the twenty twelve theme.

    creating the two columns and their customization are, i suspect, where i messed up the code. anyone have ideas for how i can keep my current theme active and link to the posts?

    thanks so much anyone who can chime in

    Thread Starter dequecolour

    (@dequecolour)

    thanks for this. i have been experimenting with the social icons, and they now look like they are slightly underneath the actual header. can i move them up?

    internalcompass.us/castle

    can you help, or is there a resource you would point me to that might help me learn how to correct that? i tried editing the margin on the social icons code in css but that isn’t helping.

    Thread Starter dequecolour

    (@dequecolour)

    thanks so much. i really really appreciate it! that worked!

    Thread Starter dequecolour

    (@dequecolour)

    sorry those links didnt embed. not sure how to do the pastebin but hoping you can follow the source link to the code.

    Thread Starter dequecolour

    (@dequecolour)

    thank you!! i hope i’m doing pastebin right. i never heard of it until today.

    my header.php is

    <script src=”https://pastebin.com/embed_js.php?i=xzNEqv1c”></script&gt;

    footer.php is

    <script src=”https://pastebin.com/embed_js.php?i=w8JkPrNT”></script&gt;

    also if you look at the style.css file from my first post, you can see that i created divs to make the left and right columns of posts. but their width is narrow enough, that i dont think it should interfere. i am stumped

    Thread Starter dequecolour

    (@dequecolour)

    @wp-21 thank you thank you. i’m hoping that is right bc it sounds resolvable, and this is making me bonkers.

    do you mean in my css? i have this (code pasted below) in my child theme style.css for twenty twelve. i’m also pasting the code for index.php

    — not sure where to change what you are referring to!

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      https://example.com/
    Description:    Child theme for the Twenty Twelve theme
    Author:         Your name here
    Author URI:     https://example.com/about/
    Template:       twentytwelve
    Version:        0.1.0
    */
    @import url("../twentytwelve/style.css");
    @media screen and (min-width: 600px) {
    .socialicons {
        float: right;
        margin-top: -500;
        position: relative;
        width: 250px;
    }
    }
    
    .socialicons img {
       float: right;
    }
    .widget-area img, img.header-image { border-radius: 0; box-shadow: none; }
    
    #signup {
        float: left;
        width:200px;
        height:40px;
        border: black 1px solid;
    }
    
    @media screen and (min-width: 600px) {
        .entry-header .entry-title {
            font-size: 14px;
        }
    }
    div#left-column {
    	width: 290px;
    	float: left;
    	clear: none;
    	}
    div#right-column {
    	width: 290px;
    	float: right;
    	clear: none;
    	}

    index

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * For example, it puts together the home page when no home.php file exists.
     *
     * Learn more: https://codex.www.ads-software.com/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    
    get_header(); ?>
    	<div id="primary" class="site-content">
    		<div id="content" role="main">
    
            <div style="margin-bottom: 20px;">
    
            </div>
            <a href="internalcompass.us/castle" target="_blank">
    
    <?php easyrotator_display_rotator('erc_79_1374391970'); ?>
    
    </div>
            <a href="internalcompass.us/castle" target="_blank">
    <img src="https://internalcompass.us/castle/wp-content/uploads/2013/07/recent-posts1.jpg" border="0" style="border:none;max-width:100%;" alt="recent posts favorite posts" />
    </a>
    <div id="right-column">
    <?php $my_query = new WP_Query('category_name=favorites');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate[] = $post->ID ?>
      <?php get_template_part( 'content', get_post_format() ); ?>
      <?php endwhile; ?>
    </div>
    <div id="left-column">
    <?php $my_query = new WP_Query('category_name=Recents');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate[] = $post->ID ?>
      <?php get_template_part( 'content', get_post_format() ); ?>
      <?php endwhile; ?>
    </div>
    
    			<?php twentytwelve_content_nav( 'nav-below' ); ?>
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Thread Starter dequecolour

    (@dequecolour)

    this is the code i tried to paste above. also if y’all need to delete this post, and i can create a new one, that is fine. i’m just puzzled.

    i added this filter in functions.php which worked except it put the dates in the Nav which i do not want!

    maybe i need other code after the if is home in line 3. but bc of the code i have in my index.html i can’t just use if is the loop. that doesn’t work at all.

    <?php
    function add_dates_to_title_wpse106605($title, $id) {
        if (is_home()){
            $time = get_the_time( $d = 'l, F j, Y', $post = $id );
            return $title . '<br><small class="time">' . $time . '</small>';
        } else {
            return $title;
        }
    }
    
    add_filter('the_title', 'add_dates_to_title_wpse106605', 10, 2);
    ?>

    here is my index.php

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * For example, it puts together the home page when no home.php file exists.
     *
     * Learn more: https://codex.www.ads-software.com/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    
    get_header(); ?>
    	<div id="primary" class="site-content">
    		<div id="content" role="main">
    
            <div style="margin-bottom: 20px;">
    
            </div>
            <a href="internalcompass.us/castle" target="_blank">
    
    <?php easyrotator_display_rotator('erc_79_1374391970'); ?>
    
    </div>
            <a href="internalcompass.us/castle" target="_blank">
    <img src="https://internalcompass.us/castle/wp-content/uploads/2013/07/recent-posts1.jpg" border="0" style="border:none;max-width:100%;" alt="recent posts favorite posts" />
    </a>
    <div id="right-column">
    <?php $my_query = new WP_Query('category_name=favorites');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate[] = $post->ID ?>
      <?php get_template_part( 'content', get_post_format() ); ?>
      <?php endwhile; ?>
    </div>
    <div id="left-column">
    <?php $my_query = new WP_Query('category_name=Recents');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate[] = $post->ID ?>
      <?php get_template_part( 'content', get_post_format() ); ?>
      <?php endwhile; ?>
    </div>
    
    			<?php twentytwelve_content_nav( 'nav-below' ); ?>
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Thread Starter dequecolour

    (@dequecolour)

    omg sorry i thought i entered the code between backticks ugh! sorry!

Viewing 15 replies - 16 through 30 (of 67 total)