• 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

simbasounds

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 30 total)
1 2 →
  • Author
    Posts
  • March 19, 2016 at 6:25 am in reply to: How do I output the returned value of a function that uses an earlier hook? #181842
    simbasounds
    Member

    Just to wrap this up: I solved my specific issue by using globalised variables to pass values between action hook functions.

    March 14, 2016 at 12:39 am in reply to: How do I output the returned value of a function that uses an earlier hook? #181381
    simbasounds
    Member

    re. "Nothing within the head tags display on the page. You should also wrap the content in meta tags or something that won't cause a HTML validation error, otherwise you will not be able to reuse its content anywhere else on the page."
    Actually it does display when used in wp_head, but in any case it's just a temporary test so validation doesn't matter at this stage. I'm simply using those hooks as a sort of console.log. I inspect the page source to see if the hook output or not.

    re. "Maybe if you can be more specific with your requirements, we can provide a definitive answer."
    As I said, I will create a more generic example for this forum - which I value highly - to answer my original question. Thanks for your eagerness to help, Victor. I really appreciate it. I'll do some testing in my own time and be back with a better question, perhaps an answer too.

    March 13, 2016 at 10:44 am in reply to: How do I output the returned value of a function that uses an earlier hook? #181351
    simbasounds
    Member

    ..hence my question: How do I output the returned value of a function that uses an earlier hook?

    March 13, 2016 at 9:38 am in reply to: How do I output the returned value of a function that uses an earlier hook? #181345
    simbasounds
    Member

    Hi Victor,

    Thanks for responding. I can confirm the dynamik_has_label function is returning true, or at least in the case of:

    add_action( 'wp_head', 'echo_source' );
    function echo_source() {
        echo page_source();
    }

    ie. it works on the page where the "test" label is active, hooked into wp_head, but not genesis_footer.

    I probably made my question a little too open to ambiguity by phrasing it in the context of the Dynamik Website Builder. Ideally, and especially in the case of Stack Exchange I should probably have limited it to WordPress functions.

    I'm going to wait and see what CobaltApps say about this specific case, then reply with their answer.
    Then time-permitting, see if I can create a more generic example to answer my original question.

    January 13, 2016 at 2:03 pm in reply to: Simple Sidebars: Styling Individual Sidebars #176409
    simbasounds
    Member

    Bump this suggestion. Simple Sidebars should ideally add a unique ID or class to the whole sidebar div.

    In line 102 of the plugin it is registered missing a 'class' parameter.

    //* Cycle through created sidebars, register them as widget areas
    foreach ( (array) $_sidebars as $id => $info ) {
        genesis_register_sidebar( array(
            'name'        => esc_html( $info['name'] ),
            'id'          => $id,
            'description' => esc_html( $info['description'] ),
            'editable'    => 1,
        ) );
    }

    Not that it would help: according to the codex - Function Reference/register sidebar "This class will only appear in the source of the WordPress Widget admin page. It will not be included in the frontend of your website."

    So I guess it could add a body class? eg. .ssidebar-my-sidebar-id

    December 11, 2015 at 10:25 pm in reply to: Add comment form to archive posts #173584
    simbasounds
    Member

    Coincidentally the project I'm working on now has this requirement again, so big thanks, Christoph!

    December 9, 2015 at 8:37 am in reply to: Add comment form to archive posts #173330
    simbasounds
    Member

    Thanks Susan, yes I understand that. I simply meant in a general sense that if someone had the same issue they could come here and find the answer, seeing as it's probably something that people would need ie. the ability to have comments in a blog archive. No pressure whatsoever : ) Most humbly grateful to the volunteers..

    December 9, 2015 at 7:45 am in reply to: Add comment form to archive posts #173316
    simbasounds
    Member

    I can't even remember what this was for, but no, I don't think I managed to solve it.
    If the forum is to be considered a resource of knowledge, then it should probably be answered.
    Thanks

    January 24, 2015 at 3:22 pm in reply to: Display Excerpt instead of content in CPT archive with genesis_custom_loop #138550
    simbasounds
    Member

    Great : ) thanks
    Hopefully I'll get a chance to test-drive it soon..

    January 24, 2015 at 2:41 pm in reply to: Display Excerpt instead of content in CPT archive with genesis_custom_loop #138544
    simbasounds
    Member

    Hi Ren, thanks for replying.
    I no longer need this functionality on my current project, but it's worth clearing up for future reference.

    I already have Theme Settings set for normal post archives.
    What if I wanted different settings for CPTs?

    I imagine it would be something like the following in my CPT archive custom loop (although I don't recall if it worked or not):

    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    add_action('genesis_entry_content', 'custom_content');
    function custom_content() {
        if (has_excerpt( $post->ID )) {
            the_excerpt();
        } else {
            the_content();
        }
    }
    January 10, 2015 at 2:33 am in reply to: Filter and Modify Genesis Taxonomy Links #136833
    simbasounds
    Member

    Hi Susan,

    It's been a while, but I think I managed to work around it.
    So no, as the question stands it isn't resolved, but I don't need to escalate it either.

    As a general question, the answer - if / when it comes - may be useful to someone.
    In cases like these do we close threads or leave them open?

    (As a separate issue I'm no longer receiving follow-up emails, so I only spotted your reply by accident).

    January 10, 2015 at 2:01 am in reply to: Possible to modify standard Genesis loop args? #136831
    simbasounds
    Member

    Thanks so much Ren. In functions.php I used:

    add_action( 'pre_get_posts', 'set_cat_tax_args' );
    function set_cat_tax_args( $query ) {
    	if ($query->is_tax('charity-category')) {
    		$query->set( 'orderby','rand' );
    		$query->set( 'posts_per_page', -1 );
    	}
    }

    And it's working!

    January 9, 2015 at 3:34 pm in reply to: Sidebar content falls outside of widget on CPT #136786
    simbasounds
    Member

    Ok, so this wasn't a Genesis or Simple Sidebars issue, rather an issue with the way I coded a shortcode in the widget.
    The solution came down to wrapping the shortcode html:

    ob_start();
    // html here
    return ob_get_clean();

    Longer explanation here.

    January 4, 2015 at 11:06 am in reply to: Classes being removed: sf-js-enabled sf-arrows #136031
    simbasounds
    Member

    Thanks Lorraine, I did manage to work around it, yes, by modifying the jQuery to target the widget ids.

    October 11, 2014 at 6:49 am in reply to: Genesis Featured Post open in lightbox #127467
    simbasounds
    Member

    I eventually ended up implementing this on my own site by installing the ShadowBox plugin:

    Shadowbox JS

    In my archive-portfolio.php I used a rel="shadowbox" link on my image block post links:

    add_action('genesis_entry_content', 'post_thumbnail');
    function post_thumbnail() {
    	if ( has_post_thumbnail() ) { ?>
    		<a href="<?php echo get_page_link(); ?>" rel="shadowbox">
    			<?php the_post_thumbnail( $size, $attr ); ?>
    		</a>
    	<?php }
    }

    This makes the links open the post in an iframe lightbox.

    But the posts in the iframe lightbox had a duplicate header and navigation. Since the posts needed to be able to open as stand-alone posts - say, if linked-to from a Google search - I couldn't remove the duplicate site structure markup with php. They needed to to be hidden using CSS display:none only in the iframe.

    This was achieved by using a script which detects if the post is inside the iframe, and hides structural elements accordingly:

    <script type='text/javascript'>
    if (self !== top) document.write('<style type="text/css"> .site-header,.site-container .nav-primary,.site-container .responsive-primary-menu-container,.site-footer {display: none;}</style>');
    </script>

    Here's the result:
    http://simonbarnett.co.za/portfolio/

    There's an additional issue in that links inside the iframe posts need to open in the full browser window. Currently they open inside the lightbox. The links will need to be filtered to have target="_top". In most cases the archive-portfolio.php can be modified, but I think Genesis uses a custom function for taxonomy links because this doesn't work:

    function change_target($result) {
    	$result = str_replace('<a', '<a target="_top"', $result);
    	return $result;
    }
    add_filter('wp_list_categories', 'change_target');
    add_filter('the_category', 'change_target');

    I'll start a new thread for this query.

    September 22, 2014 at 4:09 am in reply to: Multiple body classes ignored for CPT #125284
    simbasounds
    Member

    Thanks, will give it a go..

    September 22, 2014 at 3:40 am in reply to: Multiple body classes ignored for CPT #125282
    simbasounds
    Member

    Thanks Gary. It seems more logical to me that multiple classes should be supported for CPT archives since they are supported for single CPTs and standard WordPress pages and single posts.

    My intended usage was to give users of a child theme or Dynamik skin the option of tagging any page, post, single CPT or archive certain functionality like full-width-page or sidebar-header, or both, by using body classes. So far I'm working around it by making extra combined classes with combined attributes, so there's no urgency.

    September 21, 2014 at 4:46 am in reply to: Multiple body classes ignored for CPT #125197
    simbasounds
    Member

    I set up a test site with default Genesis + Genesis Sample child theme.
    I used the members CPT code with support for 'genesis-cpt-archives-settings'.

    After updating permalinks I added two body classes to the archive settings:
    Screenshot of Custom Body Class used on CPT archive

    As shown in this screenshot of the source of the archive page it's concatenating the classes:
    Screenshot of page source with body class concatenation

    I'll contact support and see what they say..

    September 20, 2014 at 5:24 pm in reply to: Multiple body classes ignored for CPT #125179
    simbasounds
    Member

    No, HTML5. I think the hook is fine. I've been using it on many of my sites.
    I tried changing it to genesis_entry_content to see if it has anything to do with that body class space bug, but the bug remained.

    September 20, 2014 at 5:19 pm in reply to: Multiple body classes ignored for CPT #125177
    simbasounds
    Member

    Ok, I've cleaned it all up, including using the simpler CPT code.

    Looking more closely it seems that the problem is that for CPT archives it removes the space between classes.
    So if I enter fullwidth sideheader it adds a body class of fullwidthsideheader.
    I also tried fullwidth%20sideheader and even fullwidth %20 sideheader, but it still removes the encoded space.

    It's not ideal, but if there's no obvious fix I'm happy to use work-arounds.

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 30 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