Forum Replies Created
-
AuthorPosts
-
viorelepuran
MemberBrad, 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!
viorelepuran
MemberThank 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' );viorelepuran
MemberHello, 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!viorelepuran
MemberHy 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. #93968viorelepuran
Memberhello
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 #93332viorelepuran
MemberYou could try in css:
#page-id-xx .sidebar{
display:none !important;
}
#page-id-xx .content{
width: 1140px !important;
}viorelepuran
MemberIt does not works...would it help you if i gave you access to ftp and wp-admin?
viorelepuran
MemberThank 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/viorelepuran
MemberYes, 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/viorelepuran
Memberis this ok?
viorelepuran
Memberviorelepuran
MemberWhy can i not embed the Gist here?
Can you see the code?viorelepuran
MemberHy 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> -
AuthorPosts