• 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

viorelepuran

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 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • April 23, 2014 at 11:25 am in reply to: Remove featured image #102084
    viorelepuran
    Member

    Brad, thank you for being so king and trying to help me, but i tought about it more and more, and comed up with this code, that worker like a charme:

    function be_remove_image_from_features() {
    $site_layout = genesis_site_layout();

    if( 'full-width-content' === $site_layout) {
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    remove_action( 'genesis_post_content', 'genesis_do_post_image' );
    } else if ( genesis_site_layout('default') ) {
    add_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    add_action( 'genesis_post_content', 'genesis_do_post_image' );
    }
    }
    add_action( 'genesis_before_entry', 'be_remove_image_from_features' );
    add_action( 'genesis_before_post', 'be_remove_image_from_features' );

    Thank you for taking the time to respond to my problem!

    April 17, 2014 at 3:02 am in reply to: Custom Field in post editor #100918
    viorelepuran
    Member

    Thank you Brad, i googled it, and i added a custom meta box, with a text field. now i can pull the value of that field, and i did it all in my function.php.
    This is the code i used:

    / Little function to return a custom field value
    function wpshed_get_custom_field( $value ) {
    global $post;

    $custom_field = get_post_meta( $post->ID, $value, true );
    if ( !empty( $custom_field ) )
    return is_array( $custom_field ) ? stripslashes_deep( $custom_field ) : stripslashes( wp_kses_decode_entities( $custom_field ) );

    return false;
    }

    // Register the Metabox
    function wpshed_add_custom_meta_box() {
    add_meta_box( 'wpshed-meta-box', __( 'Ebay listing', 'textdomain' ), 'wpshed_meta_box_output', 'post', 'side', 'high' );
    }
    add_action( 'add_meta_boxes', 'wpshed_add_custom_meta_box' );

    // Output the Metabox
    function wpshed_meta_box_output( $post ) {
    // create a nonce field
    wp_nonce_field( 'my_wpshed_meta_box_nonce', 'wpshed_meta_box_nonce' ); ?>

    <p>
    <label for="wpshed_textfield"><?php _e( 'Keyword', 'textdomain' ); ?>:</label>
    <input type="text" name="wpshed_textfield" id="wpshed_textfield" value="<?php echo wpshed_get_custom_field( 'wpshed_textfield' ); ?>"/>
    </p>

    <?php
    }

    // Save the Metabox values
    function wpshed_meta_box_save( $post_id ) {
    // Stop the script when doing autosave
    if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;

    // Verify the nonce. If insn't there, stop the script
    if( !isset( $_POST['wpshed_meta_box_nonce'] ) || !wp_verify_nonce( $_POST['wpshed_meta_box_nonce'], 'my_wpshed_meta_box_nonce' ) ) return;

    // Stop the script if the user does not have edit permissions
    if( !current_user_can( 'edit_post' ) ) return;

    // Save the textfield
    if( isset( $_POST['wpshed_textfield'] ) )
    update_post_meta( $post_id, 'wpshed_textfield', esc_attr( $_POST['wpshed_textfield'] ) );

    }
    add_action( 'save_post', 'wpshed_meta_box_save' );

    March 17, 2014 at 2:55 am in reply to: Ads in grid style #95258
    viorelepuran
    Member

    Hello, above line 25, i added this code <?php if($j == 6) { echo do_shortcode('[do_widget id=text-21]');} ?>
    I am using Amr Short code widget to pull info from dashoard->widgets.
    That code worked for me .
    Thank you Brad for your help, you are a great guy!

    March 9, 2014 at 2:30 am in reply to: Ads in grid style #94016
    viorelepuran
    Member

    Hy Brad, yes i used that to create the 2 columns grid, and not i can`t go back and change it.
    I tried your suggestions, but i had no result.
    Would it be okwith you if i gave you acess to wp-admin and ftp, so you can try it on my site?
    Maybe i am missing something or i am doing something wrong when i am doing it.
    Thank you again for your help!

    March 8, 2014 at 3:37 pm in reply to: Magazine pro : How to add a banner just after secondary menu. #93968
    viorelepuran
    Member

    hello
    please try this in functions.php in child theme:

    function sk_move_nav_inside_site_inner() {

    remove_action( 'genesis_after_header', 'pagetitle' );
    add_action( 'genesis_before_content_sidebar_wrap', 'pagetitle' );

    }
    // Add the Page Title section
    add_action( 'genesis_after_header', 'cegg_pagetitle' );
    function cegg_pagetitle() {

    if (is_active_sidebar( 'pagetitle' )) {
    genesis_widget_area( 'pagetitle', array(
    'before' => '<div class="pagetitle widget-area"><div class="wrap"',
    'after' => '</div></div>'
    ) );
    }
    }

    you will get a widget in dashboard, and you can add your script inside that widget.
    Let me know if it worked for you.

    March 4, 2014 at 2:29 am in reply to: Duplicating a Home Page for Other Pages on the Executive Pro Theme #93332
    viorelepuran
    Member

    You could try in css:

    #page-id-xx .sidebar{
    display:none !important;
    }
    #page-id-xx .content{
    width: 1140px !important;
    }

    March 3, 2014 at 8:26 am in reply to: Ads in grid style #93197
    viorelepuran
    Member

    It does not works...would it help you if i gave you access to ftp and wp-admin?

    March 3, 2014 at 7:35 am in reply to: Ads in grid style #93190
    viorelepuran
    Member

    Thank you for your effort. I tried all 4 codes on the link you gaved me, but only the las one seems to work for me.
    The thing is that it replaces the 6th post excerpt withe the add.I need it to place the ad bellow excerpt, and to be as whidth as the 2 columns. I think the first code, with black background would work, but maybe i am doing something wrong...
    Can you please look again at that code?
    Here is the link with the working last code
    http://test.sneakerbardetroit.com/

    March 3, 2014 at 5:45 am in reply to: Ads in grid style #93173
    viorelepuran
    Member

    Yes, it is ok now.
    Do you have any ideea of how to place a ad after the 6th post, like shown in the bellow image?
    http://postimg.org/image/qlawdlyc7/

    March 3, 2014 at 5:26 am in reply to: Ads in grid style #93171
    viorelepuran
    Member

    is this ok?

    March 3, 2014 at 3:11 am in reply to: Ads in grid style #93161
    viorelepuran
    Member
    March 3, 2014 at 3:01 am in reply to: Ads in grid style #93158
    viorelepuran
    Member

    Why can i not embed the Gist here?
    Can you see the code?

    March 3, 2014 at 2:50 am in reply to: Ads in grid style #93154
    viorelepuran
    Member

    Hy brad, thank you for your reply.
    I did as you told me to do.Please tell me if the code from category.php is enough, or if you need something else.
    <script src="https://gist.github.com/anonymous/9320928.js"></script>

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)

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