Forum Replies Created

Viewing 15 replies - 706 through 720 (of 1,132 total)
  • Theme Author Ryan Hellyer

    (@ryanhellyer)

    Sorry. I didn’t see this question until just now.

    1. Yes, the meta data is in the index.php file. You can simply move it further up in that file to make it appear at the top of the post.

    2. Each piece of meta data has a different ID or class which you can use to target them with CSS and change the colours to whatever you desire 🙂

    Theme Author Ryan Hellyer

    (@ryanhellyer)

    Sorry. I didn’t see this question until just now.

    Featured images will show up on archive pages. I’m guessing you were expecting them to show up on the front page, but that wouldn’t make any sense since the main posts are shown there already. If the featured image included an image used within the post, then the same image would appear twice, which would be very odd.

    Theme Author Ryan Hellyer

    (@ryanhellyer)

    Sorry. I didn’t see this support question when you first posted it.

    Here is a replacement for the index.php file in the theme, which will remove the main page titles for you. I haven’t tested this, but I can’t see any reason why it wouldn’t work. If you experience any problems, then please let me know and I’ll take a closer look for you 🙂

    <?php
    /**
     * Modified main template file with no headings
     *
     * @package Hellish Simplicity
     * @since Hellish Simplicity 1.1
     */
    
    get_header(); ?>
    
    <div id="content-area">
    	<div id="site-content" role="main"><?php
    
    // Load main loop
    if ( have_posts() ) {
    
    	// Start of the Loop
    	while ( have_posts() ) {
    		the_post();
    		?>
    
    		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    			<div class="entry-content"><?php
    
    				/*
    				 * Display full content for home page and single post pages
    				 */
    				if ( is_home() || is_single() || is_page() ) {
    					the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'hellish' ) );
    					wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'hellish' ), 'after' => '</div>' ) );
    				} else {
    					// Use the built in thumbnail system, otherwise attempt to display the latest attachment
    					if ( has_post_thumbnail() ) {
    						the_post_thumbnail( 'excerpt-thumb' );
    					} else {
    						$args = array(
    							'post_type'      => 'attachment',
    							'post_mime_type' => 'image',
    							'post_parent'    => get_the_ID(),
    							'numberposts'    => 1,
    						);
    						$images = get_posts( $args );
    						foreach( $images as $image ) {
    							echo wp_get_attachment_image( $image->ID, 'excerpt-thumb' );
    						}
    					}
    					the_excerpt();
    				}
    				?>
    			</div><!-- .entry-content --><?php
    
    			// Don't display meta information on static pages
    			if ( ! is_page() ) { ?>
    			<footer class="entry-meta">
    				<?php
    				printf(
    					__( 'Posted on <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'hellish' ),
    					esc_url( get_permalink() ),
    					esc_attr( get_the_time() ),
    					esc_attr( get_the_date( 'c' ) ),
    					esc_html( get_the_date() ),
    					esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    					esc_attr( sprintf( __( 'View all posts by %s', 'hellish' ), get_the_author() ) ),
    					get_the_author()
    				);
    
    				// Category listings
    				$categories_list = get_the_category_list( __( ', ', 'hellish' ) );
    				if ( $categories_list ) {
    				?>
    				<span class="cat-links">
    					<?php printf( __( ' in %1$s', 'hellish' ), $categories_list ); ?>
    				</span><?php
    				}
    
    				// Tag listings
    				$tags_list = get_the_tag_list( '', __( ', ', 'hellish' ) );
    				if ( $tags_list ) {
    				?>
    				<span class="sep"> | </span>
    				<span class="tags-links">
    					<?php printf( __( 'Tagged %1$s', 'hellish' ), $tags_list ); ?>
    				</span><?php
    				}
    
    				// Comments info.
    				if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { ?>
    				<span class="sep"> | </span>
    				<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'hellish' ), __( '1 Comment', 'hellish' ), __( '% Comments', 'hellish' ) ); ?></span><?php
    				}
    
    				// Edit link
    				edit_post_link( __( 'Edit', 'hellish' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' );
    				?>
    			</footer><!-- .entry-meta --><?php
    			} ?>
    
    		</article><!-- #post-<?php the_ID(); ?> --><?php
    
    		// If comments are open or we have at least one comment, load up the comment template
    		if ( comments_open() || '0' != get_comments_number() )
    			comments_template( '', true );
    
    	}
    
    	get_template_part( 'template-parts/numeric-pagination' );
    
    }
    else {
    	get_template_part( 'template-parts/no-results' );
    }
    ?>
    
    	</div><!-- #site-content -->
    	<?php get_sidebar(); ?>
    </div><!-- #content-area -->
    
    <?php get_footer(); ?>

    If anyone is reading this a long time in the future, then be aware that this was done for version 1.6.3 of the Hellish Simplicity.

    Forum: Fixing WordPress
    In reply to: Add Menu

    That is my theme 🙂

    You can add a menu to the sidebar via the widgets page in your admin panel.

    If you want to add a horizontal menu, then that will require significant changes to the theme. I never designed it with the intention of having a horizontal menu and I’m not sure that adding one to it retrospectively is a good idea. If you desperately need a horizontal menu, then I think looking for a different theme would be your best option.

    If you definitely want to add a horizontal menu to the Hellish Simplicity theme, then you will need to register a new menu, then add it via wp_nav_menu() in the header.php file, then add the required CSS. I can’t really teach how to do all that in a single forum thread though, as there’s a lot to learn. I’m not even sure how you would design the menu though. I think it would look a little odd if you just shoved a menu into the header randomly.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    You will probably need to modify your actual site header to do that.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    The plugin does not change logos, it changes header images.

    It is possible that some themes make the header image look like a logo, but that’s not how themes are intended to use the WordPress header image system.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    There would be no use for extra options in the main admin menu as the plugin is designed to provide custom headers for each individual post and page.

    I’m not sure how to explain how to use it any better than the instructions provided with the plugin, but hopefully the screenshots will help explain:
    https://ww.wp.xz.cn/plugins/unique-headers/screenshots/

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Ah, I see. That will be the pages that WooCommerce automatically generates for you. I noticed recently that those pages behave very oddly. They don’t appear to behave as regular WordPress pages. I’m guessing WooCommerce is hooking in at the template_redirect() hook and taking over everything from there. If my assumption is correct with that, then at that point it’s not really a “page” within WordPress anymore, and so the plugin won’t work as intended.

    It will require some extra work to get it working with those pages. You may be able to get some assistance from the WooCommerce folks. If you ask them, and they have some input on how we can work around this then please let me know. I don’t want to write tons of code just to make some other plugin work as intended, but if there’s some filter or hook I can override to force it to work, then I’m not adverse to baking that into the plugin.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Does it work if you switch to one of the default themes which come with WordPress? If it does, then your regular theme probably doesn’t support the built-in WordPress header system.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Eek, that’s going to be a bit tricky I think.

    You would need to use JavaScript to specifically disable it for that one image. I don’t know of an easy way to do that though unfortunately.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Please try it with one of the default themes, TwentyFifteen, TwentyFourteen, TwentyThirteen etc. and see if it works then. If it does, then your theme is at fault and you will need to either contact the developer or fix it yourself. Themes usually fail because they don’t implement the WordPress header functionality.

    If it still fails with one of those default themes, then please check if it works with just a plain blog post rather than the category.

    Hopefully we can get this sorted for you 🙂

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    You have given me a little more motivation to complete that plugin now at least 🙂 You aren’t the first person to ask for that functionality and I’m kinda surprised I didn’t factor it in when I built it. I guess I just didn’t think of that use case during the initial development of it.

    I’m planning to discontinue a whole bunch of my plugins before the end of the year, which will result in this one and a couple of others gaining all of my attention from now on.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    BTW, if you do go down this route, make sure you change the plugin name, or your changes will get wiped out next time an update comes along.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Currently, you need to edit the plugin code to do that unfortunately. I am (slowly) working on a new version which can do both that, and it will use the newer media gallery. I’m not sure how long that will take me to complete though, as I have quite a few other tasks on the boil right now too sorry.

    For the mean time, I recommend forking the plugin and editing the files to add extra post-type support in. New custom post-types can be added via the index.php file. I think custom taxonomies could be added via the inc/class-uh-taxonomy-header-images.php file. I don’t have time to confirm right now though sorry.

    Rest assured, this feature is on my radar though! I just need to find the time to complete it.

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Awesome! Glad to hear it’s working so well for you 🙂

Viewing 15 replies - 706 through 720 (of 1,132 total)