• Resolved andytwonames

    (@andytwonames)


    Hi,

    I’m having my first proper attempt at wordpress and I want to amend a theme. I have just read that I should do this by creating a child theme. I’ve had a bit of a read around but there seem to be too many new things for me to grapple with all at once to achieve what I need to quickly enough.

    I have used the Minimatica theme. It’s lovely. The rollover image expansion is very effective. Mrs twonames wants a very minimalist look, does not want comments and is not likely to add much more to it – but wants the option to at a later date. ??

    I’m perfectly capable of copying and moving files about and editing them but can’t make sense of what to copy where and what to change.

    What I would like to do is point at the web site and say what I would like to change and have some kind soul guide me through what to do. Will that work? …. Here we go….

    https://www.indigoshades.com is the site.
    On the home page, I would like to do 2 things….
    1. I want to remove the navigation bar at the bottom of the screen (currently Home and Posts)
    2. I think we will want to add another couple of posts – but the theme will put those onto a second page of four rollover links. We would prefer to change to link to 6 posts from the 1st page. So I guess I might also have to change the parameters for the closed and opened widths of the images.

    On any of the post pages, I want to do the following.
    1. Remove the search function (I already removed all of the widgets – including search – but the search persists. I wonder if this is a default wordpress thing rather than the theme?)
    2. Remove the “written by, on date, filed under, Edit” panel
    3. Move the picture – either to the left or right and move the text of the post up so it starts alongside the top of the picture (so content can be seen without having to scroll).

    I hope I’m not asking for too much at once. Thanks in advance for the help.

    Andy.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Andy,
    Most of what you are asking/wondering about is very doable through a child theme.

    Home page:
    1. Doable. In your child theme you would create a footer.php file that doesn’t contain the navigation code.
    2. Possible, just not entirely what steps you would take.

    Posts:
    1. Possible. Create a new sidebar.php with the default widgets removed.
    2. Create a new content.php and remove what you don’t want.
    3. CSS in your child theme will override the parent theme.

    Thread Starter andytwonames

    (@andytwonames)

    Jose,

    Thank you.

    I have had a quick look and I think I can see what I need to do in the php files but the CSS is a mystery to me.

    I am at my day job now so I should not be looking at this at all. ??

    I think I am going to need more help understanding the CSS, but I will take a look later when I have time and see what I can break for myself.

    Thanks again

    “I’ll be back”

    Andy.

    Thread Starter andytwonames

    (@andytwonames)

    Right, thanks to the advice from Jose, I have most of what I am looking for.
    I still need help and I hope to get it here. Really, I need to achieve two things.

    • Get the web site looking the way Mrs twonames wants it immediately
    • Learn where to look and how to find answers for myself
    • ok, more than two.. Learn PHP
    • Learn CSS

    I am a programmer in COBOL (stop laughing) and a variant of SQL (proprietary to my employer)

    I once knew enough to put up fairly simple HTML pages but a lot of the tags are a mystery.

    I know enough about PHP to be able to spell it ?? and CSS is a mystery to me.

    First thing then is the layout of an individual post page. I have not managed to do anything here. I want the picture to be at the top right of the page (under the banner) and for the text to start on the left in line with the picture and wrap around it.

    What do I need to put in style.css to make that happen?

    If I detail below what I have done, will someone please tell me if there was a better way to do it or if ‘m going to cause myself problems please?

    I have created a child theme to minimatica and taken a complete copy of style.css from the parent theme and added the line to make it a child of minimatica.

    I have created a new copy of content.php, footer.php and sidebar.php in the child theme and edited them. This has removed things as I wanted. The edits have produced the output I want but have I used the best way to comment out code and will I have caused problems?

    sidebar.php – after inactivating all of the widgets in minimatica, the search item was still there. This got rid of it.

    <?php
    /**
     * The Right Sidebar
     *
     * @package WordPress
     * @subpackage Minimatica
     * @since Minimatica 1.0
     */
    ?>
    
    <div id="sidebar" class="widget-area" role="complementary">
    <em><?php /*
    Removed by Andy
    	<?php if( is_active_sidebar( 1 ) ) : ?>
    		<?php dynamic_sidebar( 1 ); ?>
    	<?php else : ?>
    		<?php the_widget( 'WP_Widget_Search' ); ?>
    		<?php the_widget( 'Minimatica_Ephemera_Widget', array( 'title' => 'Asides' ) ); ?>
    		<?php the_widget( 'WP_Widget_Pages', array(  ) ); ?>
    	<?php endif; ?>
    Removed by Andy
    */ ?>
    </em></div><!-- #sidebar -->

    footer.php – Got rid of the footer but I wonder about the second item wp-footer I don’t see what this does – whether it’s in or out seems to make no difference

    <?php
    /**
     * The footer Template
     *
     * @package WordPress
     * @subpackage minimatica
     * @since Minimatica 1.0
     */
     ?>
     		<footer id="footer">
    <em><?php /*
    Removed by Andy
    			<?php get_sidebar( 'footer' ); ?>
     			<nav id="access" role="navigation">
     				<?php wp_nav_menu( array( 'theme_location'  => 'primary_nav', 'container_id' => 'primary-nav', 'container_class' => 'nav', 'fallback_cb' => 'minimatica_nav_menu' ) ); ?>
    			</nav><!-- #access -->
    removed by Andy
    */ ?></em>
    		</footer><!-- #footer -->
    	</div><!-- #wrapper -->
    <em><?php /*
    Removed by Andy
    	<?php wp_footer(); ?>
    removed by Andy
    */ ?>
    </em></body>
    </html>

    Finally content.php – two bits commented out

    <?php
    /**
     * Displays the post content. Used as fallback for post formats
     *
     * @package WordPress
     * @subpackage Minimatica
     * @since Minimatica 1.0
     */
     ?>
    
    <div id="content">
    	<div class="entry-header">
    		<a class="colorbox" href="<?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); echo $thumbnail[0] ?>">
    			<?php the_post_thumbnail( 'single-thumb' ); ?>
    		</a>
    		<aside class="entry-meta">
    <em><?php /* Removed by Andy
    			<ul>
    				<li><?php _e( 'Written by', 'minimatica' ); ?> <?php the_author_posts_link(); ?></li>
    				<li><?php _e( 'on', 'minimatica' ); ?> <time datetime="<?php the_time( 'Y-m-d' ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></time></li>
    				<li><?php _e( 'Filed under', 'minimatica' ); ?> <?php the_category( ', ' ); ?></li>
    				<?php edit_post_link( __( 'Edit', 'minimatica' ), '<li>', '</li>' ); ?>
    			</ul>
    Removed by Andy
    */ ?></em>
    			<?php the_tags( '<div class="entry-tags">', ' ', '</div>' ); ?>
    		</aside><!-- .entry-meta -->
    		<div class="clear"></div>
    	</div><!-- .entry-header -->
    	<section class="entry-content">
    		<?php the_content(); ?>
    		<div class="clear"></div>
    		<?php wp_link_pages( array( 'before' => '<p class="pagination">' . __( 'Pages' ) . ': ' ) ); ?>
    	</section><!-- .entry-content -->
    <em><?php /* Removed by Andy
    	<?php comments_template(); ?>
    Removed by Andy
    */ ?></em>
    </div><!-- #content -->

    I know I’m asking a lot but I hope someone can help.

    Thanks

    Andy

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hey Andy,

    wp_footer() is actually a template tag used in WordPress to output any scripts that a developer chooses so you may want to uncomment that. ??

    Some learning resources for me have been php.net and for CSS I actually read a book by Wrox Publishers. There are plenty others to learn from and several sites devoted to that as well. ?? The one thing that will help is plenty of experimentation. Don’t be afraid of ruining things, you can learn how not to do things that way. ??

    Thread Starter andytwonames

    (@andytwonames)

    Hi Jose,

    Thanks for the extra advice. I shall put wp_footer back in.

    Regarding css, I knew enough to know that I needed to find the class which applied to the picture and text blocks and found that with developer tools on firefox. Having found the class, I had no idea what to do next.

    Just adding a float:right; did it. A colleague at work helped.

    The trouble is knowing what commands are available. Time to get to a book shop.

    https://www.indigoshades.com now looks the way Mrs twonames wants it. I will very soon put in credits for WP and the minimatica theme author.

    Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘help with child theme creation please’ is closed to new replies.