• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

studionoobly

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 20 posts - 1 through 20 (of 33 total)
1 2 →
  • Author
    Posts
  • November 28, 2016 at 6:28 am in reply to: 'Archive Intro Text' only showing on the first page. #196716
    studionoobly
    Member

    So I figured out that I'm not going crazy and the issue is caused by a plugin.

    September 23, 2016 at 9:16 am in reply to: Remove the "Leave a Comment" link #193596
    studionoobly
    Member

    Ah! That place, of course, I forgot about that.

    Thanks

    September 23, 2016 at 4:05 am in reply to: Custom excerpt length #193576
    studionoobly
    Member

    Thanks Jess,

    I've tried that you can see it in the second snippet of code in my question.

    Fortunately and after much searching I found that this works when I put it into the category templates.

     echo substr(get_the_excerpt(), 0,350).' [...]';
     echo '<a class="button archive-button" href="'. get_permalink( get_the_ID() ).'">Continue&nbsp;Reading&nbsp;</a>';

    you can view the full code here at stackoverflow

    September 16, 2016 at 8:42 am in reply to: Pagination issue with a custom category template #193239
    studionoobly
    Member

    OK so I finally figured out what was causing the issue. I am using Custom Meta Boxes 2 and on some templates I'm using repeatable fields and if you don't use:

    <?php if ( ! empty( $term ) ) : ?> don't forget the <?php endif; ?> at the end.

    Then on empty fields that are not filled in by the user you will end up with errors that can apparently reek havoc with things like pagination.

    September 15, 2016 at 10:10 am in reply to: Pagination issue with a custom category template #193203
    studionoobly
    Member

    Yup, tried your code too, thanks but it still retrieves to the 404 message

    September 15, 2016 at 8:13 am in reply to: Pagination issue with a custom category template #193190
    studionoobly
    Member

    Thanks Brad,

    Still getting a 404?

    So I installed the 'Debug This' plugin and checked the Query > Rewrites and got the following

    Matched Rule: (.+?)/([^/]+)(?:/([0-9]+))?/?$
    Matched Query: category_name=music&name=page&page=2
    Query String: page=2&name=page&category_name=music&debug-this=rewrites

    I found this article http://meigwilym.com/fixing-the-wordpress-pagination-404-error/

    and tried the following code in my functions but no joy? (edit and flushed the permalinks)

    function mg_news_pagination_rewrite() {
      add_rewrite_rule(get_option('category_base').'/([^/]+)(?:/([0-9]+))?/?$', 'index.php?pagename='.get_option('category_base').'&paged=$matches[1]', 'top');
    }
    add_action('init', 'mg_news_pagination_rewrite');
    

    Really not sure what to do now?

    September 14, 2016 at 12:59 am in reply to: Pagination issue with a custom category template #193146
    studionoobly
    Member

    Hi Brad,

    Oh, well that's not a good start. I'm just trying to create a custom category template page for all categories. Within the loop I have my custom html that I need to be different from the standard Genesis fair.

    Here is the full code that I'm using just now.

    <?php
    /**
     * This is Category file.
     *
     * @package  Genesis-Child-Theme
     * @since    1.0.0
     */
    
    /**
     * Genesis custom loop
     */
    /** Replace the standard loop with our custom loop */
    remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
    add_action( 'genesis_loop', 'custom_do_press_loop' ); // Add custom loop
    
    function custom_do_press_loop() {
    		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    		$args = array(
    		'post_type' => 'post',
    		'cat' => 'category_name',
        'posts_per_page' => 3,
    		'orderby' => 'date',
    		'order' => 'DSC',
    		'paged' => $paged
    );
    
    echo '<section>';
    	/*
    	Overwrite $wp_query with our new query.
    	The only reason we're doing this is so the pagination functions work,
    	since they use $wp_query. If pagination wasn't an issue,
    	use: https://gist.github.com/3218106
    	*/
    	$loop = new WP_Query( $args );
    	if( $loop->have_posts() ):
    
        while( $loop->have_posts() ): $loop->the_post(); global $post;
    
    echo '<article>';
    
    echo '<div class="entry-content grey">';
    
      echo '<header class="entry-header block-link-entry-header">';
        echo '<h2 class="entry-title block-link-entry-title">' . get_the_title() . '</h2>';
      echo '</header>';
    
      echo '<p>' . get_the_date() . '</p>';
    
      echo '<p>'  . get_the_excerpt() . '</p>';
    
    echo '</div>';
    
      echo '<a href="' . get_permalink() . '" class="block-link image-block-link">';
    
        echo get_the_post_thumbnail();
    
      echo '</a>';
    
    echo '</article>';
    
    		endwhile;
    		do_action( 'genesis_after_endwhile' );
    
    echo '</section>';
    
    	wp_reset_query();
      endif;
    
    }
    
    genesis();
    
    September 13, 2016 at 11:35 am in reply to: Gap Between Nav and Main Page #193101
    studionoobly
    Member

    Hi,

    I wouldn't worry about it too much. I'm not familiar with your theme but that space is where your admin bar should be and it's only there when your logged in, no one else visiting the site will see it. There may be a setting in the theme options where you can turn it back on again. If not there will be some code in the themes function file that deals with it but if your not familiar with code I wouldn't go editing things.

    August 22, 2016 at 1:32 pm in reply to: A featured image for individual categories #191816
    studionoobly
    Member

    Yes a unique image but not in the site header currently I have the main menu there, I would need the image to go into the content just above the category title.

    August 22, 2016 at 12:56 pm in reply to: A featured image for individual categories #191812
    studionoobly
    Member

    Yea I'd like to add a different header image to each of the category archive pages - so the way I would envisage it would be the user clicks on Category settings and somewhere in there they could add a featured image to the category.

    This is the current code that adds featured images to the header

    add_action( 'genesis_entry_header', 'themeprefix_featured_image', 1 );
    function themeprefix_featured_image() {
    	$image = genesis_get_image( array( // more options here -> genesis/lib/functions/image.php
    			'format'	=> 'html',
    			'size'		=> 'large',// add in your image size either a custom one or a default - https://codex.wordpress.org/Post_Thumbnails
    			'context' => '',
    			'attr'		=> array ( 'class' => 'aligncenter' ), // set a default WP image class
    
    		) );
    	if ( is_singular() || is_page() ) {
    		if ( $image ) {
    			printf( '<div class="featured-image">%s</div>', $image ); // wraps the featured image in a div with css class you can control
    		}
    	}
    }
    August 22, 2016 at 11:53 am in reply to: A featured image for individual categories #191805
    studionoobly
    Member

    Cool thanks, I'll have a look but would prefer to do it with no plugins.

    May 13, 2016 at 4:59 am in reply to: Superfish deactivation snippet not working. #185559
    studionoobly
    Member

    Yus!

    Thanks Victor, that did the trick. Average load time on my pages now (on an regular 2G network) is down to about 2 seconds.

    Thanks,

    Noah

    May 13, 2016 at 2:32 am in reply to: Superfish deactivation snippet not working. #185546
    studionoobly
    Member

    I'm afraid not, I think I have tried all the same things you have but they still don't go? The only thing I can think but haven't tried is going through all the code I have added to my custom theme functions file and temporarily block out each one, then reload the browser after each try and see if it's something else that is blocking that bit of code. Given the amount of code I have in that file it could take a while. If I find anything I'll let you know.

    May 3, 2016 at 8:11 am in reply to: Superfish deactivation snippet not working. #184901
    studionoobly
    Member

    Yes, I know it's the correct code, what I'm saying is that I replaced the old code with the one you and Brad provided and that did not work either.
    Thanks

    May 3, 2016 at 5:35 am in reply to: Superfish deactivation snippet not working. #184889
    studionoobly
    Member

    Thanks Victor, but that is the same code as Brad linked too.

    May 3, 2016 at 4:50 am in reply to: Superfish deactivation snippet not working. #184880
    studionoobly
    Member

    Thanks Brad

    But it still seems to be getting it from "wp-content/themes/genesis/lib/js/menu/superfish.min.js" I have the code at the bottom of my functions.php, I have tested in a different browser in private mode and they still turn up?

    April 11, 2016 at 2:43 am in reply to: How to place an element outside the .wrap in the main header? #183355
    studionoobly
    Member

    Thanks GD.

    I tried that and it moved the top-bar above the header wrap but it also created a new wrap which then wrapped its self around the top-bar and the original wraper and it's content?

    I have found a solution thanks to https://gist.github.com/neilgee/83abf5affc2af26a527e

    Do you think this would be safe to use in terms of future Genesis theme updates or do you think this might break quite easily? Thanks.

    Here's what I did with it:

    //remove initial header functions
    remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
    remove_action( 'genesis_header', 'genesis_do_header' );
    //add in the new header markup - prefix the function name - here sm_ is used
    add_action( 'genesis_header', 'sm_genesis_header_markup_open', 5 );
    add_action( 'genesis_header', 'sm_genesis_header_markup_close', 15 );
    add_action( 'genesis_header', 'sm_genesis_do_header' );
    //New Header functions
    function sm_genesis_header_markup_open() {
    	genesis_markup( array(
    		'html5'   => '<header %s>',
    		'xhtml'   => '<div id="header">',
    		'context' => 'site-header',
    	) );
    
    			echo '<div class="topbar">';
    
    			genesis_widget_area( 'topbar-bar-left', array(
    				'before' => '<div class="topbar-bar-left">',
    				'after' => '</div>',
    			) );
    
    			genesis_widget_area( 'topbar-bar-right', array(
    				'before' => '<div class="topbar-bar-right">',
    				'after' => '</div>',
    			) );
    
    			echo '</div>';
    			
    	genesis_structural_wrap( 'header' );
    }
    function sm_genesis_header_markup_close() {
    	genesis_structural_wrap( 'header', 'close' );
    	genesis_markup( array(
    		'html5' => '</header>',
    		'xhtml' => '</div>',
    	) );
    }
    function sm_genesis_do_header() {
    	global $wp_registered_sidebars;
    	genesis_markup( array(
    		'html5'   => '<div %s>',
    		'xhtml'   => '<div id="title-area">',
    		'context' => 'title-area',
    	) );
    	do_action( 'genesis_site_title' );
    	do_action( 'genesis_site_description' );
    	echo '</div>';
    	if ( ( isset( $wp_registered_sidebars['header-right'] ) && is_active_sidebar( 'header-right' ) ) || has_action( 'genesis_header_right' ) ) {
    		genesis_markup( array(
    			'html5'   => '<aside %s>',
    			'xhtml'   => '<div class="widget-area header-widget-area">',
    			'context' => 'header-widget-area',
    		) );
    			do_action( 'genesis_header_right' );
    			add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
    			add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
    			dynamic_sidebar( 'header-right' );
    			remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
    			remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
    		genesis_markup( array(
    			'html5' => '</aside>',
    			'xhtml' => '</div>',
    		) );
    	}
    }
    April 8, 2016 at 10:24 am in reply to: How to place an element outside the .wrap in the main header? #183179
    studionoobly
    Member

    Thanks but can't afford what those guys charge, I'll just keep googling : ]

    April 8, 2016 at 7:59 am in reply to: How to place an element outside the .wrap in the main header? #183167
    studionoobly
    Member

    Thanks but I would like it in the header not before, I'm trying to keep it as semantically friendly as possible.

    March 29, 2016 at 9:32 am in reply to: Moving page titles to the main header – but not on the homepage #182460
    studionoobly
    Member

    Indeed I haven't got round to moving the title to the header in that page yet. It seems to turn up just after "genesis_before_loop" and right after the breadcrumb menu, is there a filter or hook to grab that badboy too?

    Thanks

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 33 total)
1 2 →

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble