• 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

riseUp

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 64 total)
1 2 3 4 →
  • Author
    Posts
  • March 22, 2017 at 8:42 pm in reply to: How to sync up the Screen Name throughout the website #203689
    riseUp
    Member

    Hi Victor,

    So, I'm been trying some code based upon your recommendation, and this is what I attempted, but this does not work. I've tried some variations of this:

    function get_comment_author( $comment_ID = 0 ) {
    $comment = get_comment( $comment_ID );
    if ( empty($comment->comment_author) ) {
    if (!empty($comment->user_id)){
    $user=get_userdata($comment->user_id);
    $author=$user->user_login;
    } else {
    $author = __('Anonymous');
    }
    } else {
    $author = $comment->comment_author;
    }
    return apply_filters('get_comment_author', $author);
    }

    Can you assist in the above set of code by any chance?

    March 21, 2017 at 4:06 pm in reply to: Where to remove comment word "says" #203594
    riseUp
    Member

    That was easy. Thanks Victor!

    March 20, 2017 at 8:14 pm in reply to: Date and time on the comments section of the post is incorrect #203516
    riseUp
    Member

    I'll definitely take a look at this. Thank you!

    December 6, 2016 at 10:23 pm in reply to: How to place comment area before comments rather than after comments #197153
    riseUp
    Member

    Thank you, Victor!

    August 24, 2016 at 5:08 am in reply to: How to list all Categories and Sub-Categories onto a page #191936
    riseUp
    Member

    Oh - sorry about that. I will check again. Thanks always!

    August 23, 2016 at 8:42 pm in reply to: How to list all Categories and Sub-Categories onto a page #191930
    riseUp
    Member

    Hi @braddalton,

    On the Category Page, I wanted to list out all the parent and sub categories on the one page.

    Thanks.

    August 12, 2016 at 7:04 pm in reply to: How to limit characters when Display = Entry Excerpts #191202
    riseUp
    Member

    Opps. Thank you.

    I was able to delete 1 of them.

    When I saved, however, the excerpt does not fall within the number of characters....in this case, 49.

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 49; //* pull first 50 words
    }

    For some strange reason, the code is not applying to the homepage post excerpt.

    I made sure to go to Genesis --> Theme Settings --> Content Archives --> Display: Entry Excerpts

    Any thoughts on this? Thank you!

    August 12, 2016 at 5:34 pm in reply to: How to limit characters when Display = Entry Excerpts #191197
    riseUp
    Member

    Hello StudioPress community.

    When I copy and pasted the following code into functions.php:

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 10; //* pull first 50 words
    }

    ...the following fatal error continues to display:

    Fatal error: Cannot redeclare sp_excerpt_length() (previously declared in /home/content/p3pnexwpnas06_data03/32/3122732/html/wp-content/themes/streamline-pro/functions.php:104) in /home/content/p3pnexwpnas06_data03/32/3122732/html/wp-content/themes/streamline-pro/functions.php on line 163

    Can somebody advise on how to fix this error? Thank you.

    July 26, 2016 at 5:17 am in reply to: How to limit characters when Display = Entry Excerpts #190201
    riseUp
    Member

    Hello,

    Yes, I have done less than 50 characters such as 49 and 10. Yet, still, no changes to the output.

    I"m wondering if there is a setting that is preventing me from changing the number of characters the excerpt can display. I'm puzzled because this is a simple function but no changes. Still would like some assistance on this one...

    Thanks!

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 10; //* pull first 50 words
    }

    July 25, 2016 at 4:42 pm in reply to: How to limit characters when Display = Entry Excerpts #190187
    riseUp
    Member

    That's strange.

    I copied and pasted the following into functions.php but no impact...

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 100; //* pull first 50 words
    }

    Am I missing something here? Thanks.

    July 21, 2016 at 10:08 pm in reply to: Alternative option on genesis_entry_footer Simple Hook #189988
    riseUp
    Member

    All,

    The City displayed for joyeagles7890 is Albia. Albia is showing correctly at the bottom of the post. The issue I'm still having is that Albia is not showing on the homepage for the post.

    Mike Smith 23 is Beaverton which is right on the bottom of the post. However, the issue I'm having is that Beaverton is not showing on the homepage for the post.

    I have tried this:

    <?php if( is_home() ) { ?>
    [frm-field-value field_id= 145 user_id="[95 show=ID]
    <?php } ?>

    But I may need a tweak to allow the City result to be displayed on the homepage.

    Thank you for your assistance.

    July 21, 2016 at 9:23 pm in reply to: Alternative option on genesis_entry_footer Simple Hook #189985
    riseUp
    Member

    Hello everybody.

    Here is the latest. I added the following shortcode into the genesis_entry_footer hook....and the City was able to be displayed at the bottom of each post on the homepage. However, user [email protected] indicated Albia as the city but the homepage post for [email protected] lists Beaverton. It looks as if the following code in the genesis_entry_footer hook displays mike smith23's city selection.

    <?php if( is_front_page() ) { ?>
    [frm-field-value field_id= 145 user_id="[95 show=ID]
    <?php } ?>

    Can somebody advise on how I can tweak the above php code to ensure that the city that a user selects displays that city for his/her post and not to be included in another user's post? Thank you.

    July 21, 2016 at 4:47 pm in reply to: Alternative option on genesis_entry_footer Simple Hook #189970
    riseUp
    Member

    Hi Genesis Developer,

    When I copied and pasted your code to my functions.php, it didn't work. The horizontal line and location field did not display on the homepage for each post. Any other thoughts? Thank you.

    July 21, 2016 at 5:31 am in reply to: Alternative option on genesis_entry_footer Simple Hook #189896
    riseUp
    Member

    Hi @BradDalton, thank you for your response.

    I was looking at option 2....how does this look?

    //* Customize the entry meta in the entry footer (requires HTML5 theme support)
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    $post_meta = '[post_categories] [post_tags]';
    return $post_meta;

    if ( is_front_page() ) {
    echo do_shortcode('[frm-field-value field_id=145 user_id="[q38d7 show=ID]"]');
    }
    }

    Do I put this piece of code within the genesis_entry_footer hook area or place this in functions.php? I tried both but the horizontal line and Location: field is not displaying on each post (bottom of post) on the homepage. Thank you.

    Moses

    June 22, 2016 at 8:48 pm in reply to: How to display City and State via Meta fields on homepage posts #188082
    riseUp
    Member

    @braddalton,

    Thanks for the feedback on this.

    The following works well for the state of Alabama. alabama, with a small a, is the custom field that provides the listing of cities in Alabama.

    echo get_post_meta($postid, 'alabama', true);
    echo ", Alabama";
    wp_reset_query();

    However, I am trying to figure out how to add other states like Alaska so I tried something like this:

    <?php
    if echo get_post_meta($postid, 'Alabama', true) {
    echo ", Alabama";
    } else {
    if (echo get_post_meta($postid, 'Alaska', true) {
    echo ", Alaska";
    }
    ?>

    However, this code doesn't seem to work, especially with if else statements which I'm trying to resolve.

    Could you advise on how to use an if - else statement to accommodate other states like Alaska and Arkansas, etc?

    Thank you!

    June 19, 2016 at 6:12 am in reply to: How to display City and State via Meta fields on homepage posts #187838
    riseUp
    Member

    Hi. Sorry, but I am not understanding the context.

    June 13, 2016 at 10:37 am in reply to: Can't seem to figure out how to remove 2 column format #187481
    riseUp
    Member

    Thank you!

    June 6, 2016 at 7:25 pm in reply to: How to apply website link to php code #187074
    riseUp
    Member

    Thank you!

    June 6, 2016 at 4:36 pm in reply to: How to apply website link to php code #187071
    riseUp
    Member

    Hello Victor Font,

    Thank you. That worked!

    May I ask you a follow-up question? With the following code (which works), how does the linked website become its own tab in a browser? Currently, the link flips to the linked website. It would be nice for the linked website to become another tab rather than in it's own window.

    Thank you.

    May 29, 2016 at 8:44 pm in reply to: How to display meta tags and key/value only on posts and not pages #186485
    riseUp
    Member

    Looks like the following allowed me to resolve this thread:

    <?php

    if(is_page() == false):
    echo '<hr />';
    echo "Location: ";

    global $wp_query;
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'nearest_metro_city', true);
    wp_reset_query();
    endif;

    ?>

    Thank you!

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 64 total)
1 2 3 4 →

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