• 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

lucaslem

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 - 21 through 40 (of 60 total)
← 1 2 3 →
  • Author
    Posts
  • November 22, 2013 at 12:55 pm in reply to: Displaying custom taxonomy list on archive page template #75056
    lucaslem
    Member

    Thanks Aaron,
    I had found a clunky work-around, but will give this a go and report back.

    October 11, 2013 at 7:19 am in reply to: Diect edit CSS file of genesis framework sample theme #66251
    lucaslem
    Member

    Yeah that does make sense.

    October 11, 2013 at 7:05 am in reply to: Diect edit CSS file of genesis framework sample theme #66247
    lucaslem
    Member

    One question though specific to the way Genesis child themes work: if that child theme css file is never going to be overwritten (nor will it be importing content from other framework files), why would one not simply make edits directly rather than adding styles to the end of the sheet in order to override styles from above?

    October 11, 2013 at 6:28 am in reply to: Diect edit CSS file of genesis framework sample theme #66242
    lucaslem
    Member

    Great thanks Brad!

    October 8, 2013 at 11:08 am in reply to: Register widget area vs custom fields… pros & cons #65863
    lucaslem
    Member

    Thanks to you both for your thoughts. Brad, I think your logic of determining whether I will be using the single hoook position for different content makes most sense in this case.

    October 6, 2013 at 6:31 pm in reply to: Genesis Translations #65598
    lucaslem
    Member

    Never mind, I found the solution by downloading the Genesis translation files for the main translation work and then using load_child_theme_textdomain() for my child theme strings. This post was a huge help in figuring out how to bring it altogether.

    Thanks!

    October 6, 2013 at 3:40 pm in reply to: Genesis Translations #65591
    lucaslem
    Member

    Hi again Remkus,

    I have followed your advice and am trying to do this using "proper translation files". I have followed your instructions here (so that I don't lose translations in future) and have both the .po and .mo file in my child theme folder.

    I have some text inside custom call-to-action buttons which I need to translate. My hope was that I would be able to add custom strings to the .po file but it does not seem possible. Any ideas how I might go about adding a few strings to my .po file and then regenerating an .mo from that? Or do I need to create an entirely separate file? If so, do I just dump them in the same languages folder? Any advice or links to any tutorials would be appreciated.

    October 3, 2013 at 5:15 pm in reply to: Making entire post entry clickable – Genesis Framework #65275
    lucaslem
    Member

    3 days in I finally found the solution and figured I would share here for anyone else who might face the same issues. It's trial by fire here and it seemed I was missing the notion of the loop action hooks... and needing to put those in their own function to be applied conditionally. Many thanks to this blog post by Jonathan Perez!

    So here's my final code:

    //* 1. Conditionally remove post title, post meta and post info
    add_action('genesis_before_loop','ismh_workshops_no_entry_header');
    
    function ismh_workshops_no_entry_header() {
    
        if( 'workshops' == get_post_type() && ! is_single() ) {
        //* Remove the entry title
        remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
        //* Remove the entry header markup
        remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
        remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
        //* Remove the entry meta in the entry header
        remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
        //* Remove the entry meta in the entry footer
        remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
        }   
    }
    
    //* 2. Open link tag and add post title 
    add_action('genesis_before_entry_content', 'ismh_open_article_link_tag');
    
    function ismh_open_article_link_tag() {
        
        if( 'workshops' == get_post_type() && ! is_single() ) {
            echo '<a href ="' . get_permalink() . '">
            <h1 class="entry-title" itemprop="headline">' . get_the_title() . '</h1>';
        }
    }
    
    //* 3. Close link tag 
    add_action('genesis_after_entry_content', 'ismh_close_article_link_tag');
    
    function ismh_close_article_link_tag() {
        
        if( 'workshops' == get_post_type() && ! is_single() ) {
        echo '</a>';
        }
    }
    October 3, 2013 at 8:55 am in reply to: Making entire post entry clickable – Genesis Framework #65204
    lucaslem
    Member

    bump

    October 2, 2013 at 8:12 am in reply to: Making entire post entry clickable – Genesis Framework #65063
    lucaslem
    Member

    Ok, I have managed to get this working with these two functions:

    add_action('genesis_before_entry_content', 'ismh_open_article_link_tag');
    function ismh_open_article_link_tag() {
        
        if( is_post_type_archive( 'workshops' ) ) {
            echo '<a href ="' . get_permalink() . '">
            <h1 class="entry-title" itemprop="headline">' . get_the_title() . '</h1>';
    
            //* Remove the entry title (requires HTML5 theme support)
            remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
            //* Remove the entry meta in the entry header
            remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
            remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
            remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
            //* Remove the entry meta in the entry footer (requires HTML5 theme support)
            remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
        }
    }
    add_action('genesis_after_entry_content', 'ismh_close_article_link_tag');
    function ismh_close_article_link_tag() {
        if( is_post_type_archive( 'workshops' ) ) {
        echo '</a>';
        }
    }

    However there seems to be a bug in that the first entry in the list still display the <header class="entry-header"> which includes the linked post title as well as the entry meta. You can see a visual representation of this in this screenshot (sorry still working locally)

    Does anyone have any idea what could be causing this issue on the first post? Thanks.

    October 1, 2013 at 2:45 pm in reply to: Making entire post entry clickable – Genesis Framework #64986
    lucaslem
    Member

    Anyone have ideas on this? What hooks can I use to add the necessary mark-up? So far neither genesis_before_entry_header nor genesis_after_entry_content seem to work. My code:

    function ismh_open_article_link_tag() {
        echo '<a href ="' . get_permalink() . '">';
    }
    add_action('genesis_before_entry_header', 'ismh_open_article_link_tag(');
    function ismh_close_article_link_tag() {
        echo '</a>';
    }
    add_action('genesis_after_entry_content', 'ismh_close_article_link_tag');
    September 27, 2013 at 2:50 pm in reply to: Move entire inside an tag #64518
    lucaslem
    Member

    Hmmm, unless this small change requires a custom loop?

    September 26, 2013 at 10:01 am in reply to: Genesis Translations #64302
    lucaslem
    Member

    Thanks Remkus. I suppose you mean I should create a language file for my child theme. Can you point me in the direction of a tutorial for creating such files? I am using the CodeStyling Localization plugin but I can't find the info. Thanks.

    September 26, 2013 at 9:52 am in reply to: Genesis Translations #64299
    lucaslem
    Member

    Hello,

    I am using your plugin with great success on a multisite install (main site = eng, sub-site = french).

    I have changed the "read more" for excerpts and while it works in english, I cannot get it to display in french. Here is my code. Any advice would be welcome. Thanks!

    //* Changing excerpt more - display where "read more tag" is used.
    add_filter('excerpt_more', 'auto_excerpt_more');
    function auto_excerpt_more($more) {
        if ( 'fr_FR' == $language ) {
            return '&hellip; <a href="'.get_permalink().'" rel="nofollow">Lire</a>';
        }
        else {
            return '&hellip; <a href="'.get_permalink().'" rel="nofollow">Read</a>';
        }
    }
    September 25, 2013 at 1:11 pm in reply to: Displaying and hiding custom fields conditionally #64130
    lucaslem
    Member

    Thanks kfukawa, you're absolutely right. This case didn't occur to me as it's highly unlikely, given these are scheduled workshops, that they would have a date without a location, link etc (or any combination). However, I will refactor the code as you suggest just in case.

    September 20, 2013 at 3:55 pm in reply to: Displaying and hiding custom fields conditionally #63584
    lucaslem
    Member

    Used the ACF repeater fields addon and pretty sure I've solved my own issue:

     //* Workshop registration call to action 
    add_action( 'genesis_before_entry_content', 'ismh_workshops_registration_acf' );
    function ismh_workshops_registration_acf() {
        if ( is_single() && 'workshops' == get_post_type() && get_field('registration_details') )
             
            while( has_sub_field('registration_details') ):
    
                echo
                '<div class="registration-cta clearfix">
                    <div class="workshop-info">
                        <p class="workshop-info-data"><span class="workshop-info-callout">Date: </span>' . get_sub_field('workshop_date') . '</p>
                        <p class="workshop-info-data"><span class="workshop-info-callout">Location: </span>' . get_sub_field('workshop_location') . '</p>
                    </div>
                    <a class="button" href="' . get_sub_field('registration_link') . '">Register Now!</a>
                 </div>';
    
        endwhile;
    
    }

    Turns out when the fields are blank nothing displays 🙂 The learning curve is steep, but I'm getting there! If anyone sees anything horrendous about this code, please do chime in. Thanks!

    September 20, 2013 at 1:18 pm in reply to: Displaying custom fields above the content #63566
    lucaslem
    Member

    I've come up with another idea for this. I think repeater fields addon with AFC will allow the creation multiple call-to-action divs with same class. The only thing left is to have those divs render only when the custom fields within it are populated by the site editor. Seeing how this has largely strayed from original post, I have started a separate thread for this. Thanks.

    September 20, 2013 at 8:03 am in reply to: Displaying custom fields above the content #63517
    lucaslem
    Member

    Just for clarification: the registration process happens externally (via eventbrite), so I don't need to build a registration form.

    September 20, 2013 at 7:46 am in reply to: Displaying custom fields above the content #63516
    lucaslem
    Member

    Hmmm, never thought a form plugin could be used in this way. Do you mean as a replacement for ACF or as a compliment? Will go through the GF documentation and do a google search to see if I can find some leads. Thanks!

    September 19, 2013 at 4:59 pm in reply to: Displaying custom fields above the content #63462
    lucaslem
    Member

    Oh actually, looks like I need to take a different approach. In addition to the option of not being currently scheduled, each workshop may need to display more than one date and registration button at a time, therefore the need for the call-to-action div to repeat.

    Hmmm, perhaps I should look up a tutorial for shortcodes. Then I could put all the registration details and div styling the div inside a shortcode and simply have them insert that in the custom field. If they have more than one event planned they can simply insert two shortcode lines in the custom field.

    I have a screenshots which may make this more clear:
    One registration link
    Two registration links

  • Author
    Posts
Viewing 20 posts - 21 through 40 (of 60 total)
← 1 2 3 →
« Previous Page

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 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