AJD
Forum Replies Created
-
A child theme is easy to create, if all you need to edit is CSS. But it is a pain to make small structural changes… For example try adding a new div between the hgroup-wrap div and page-title-wrap div in the header….
Forum: Themes and Templates
In reply to: [Interface] Edit file to display a post differently.Look in structure > content-extensions.php.
Everything is added via action hooks. You would have to de-register the function for each template and register your own version.
The function: ‘interface_theloop_for_template_blog_image_large’
contains the calls for the_author() and date. You have to de-register that function, copy it, edit it for the layout you want and then register your own version.Forum: Themes and Templates
In reply to: [Interface] How do I change the green accent color?Like nialei said, to change the accent color in your child theme, instead of importing the original style sheet,
@import url("../interface/style.css");just paste everything into your child’s style.css and then search and replace the color.Forum: Themes and Templates
In reply to: [Interface] Hide Featured Slider on Blog PageThe solution offered by Theme Horse worked for me.
Set your home page to a static page, and don’t set the blog page to anything.
They weren’t accessing wp-login.php at all because this stopped the attack:
<Files "xmlrpc.php"> Order Allow,Deny deny from all </Files>Sadly this will also stop all trackbacks and pingbacks.
I don’t know enough to fully understand how xmlrpc.php can be used in a login attempt.
As an update.
This did not stop the attack,
adding to htaccess:
<files wp-admin.php> order deny,allow deny from all allow from my.ip.add.ress </files>Also I tried deleting wp-login.php, but still am getting notifications from Life Traffic:
Kennesaw, United States attempted a failed login using an invalid username “admin”.
IP: 66.56.51.99 [block]
Hostname: c-66-56-51-99.hsd1.ga.comcast.net
5 seconds agoI’m not sure how that is possible…
Hi this looks like a promising solution to display recurring events as a single event.
Is there a way to implement this without hacking the plugin? Perhaps a template override or hook/filter?
Thanks.
Here is a solution to make custom headers work on the blog page, it has some other functionality as well.
Paste the code from this pastebin: into your child theme functions.php.
Note: this will disable using the featured image as the header image for posts. You will have to set the custom header. If you have set the custom header for the blog page, it will be used on ALL posts unless you specifically add a custom header for that post.After setting up your functions.php file you will also need to copy the header.php file to your child theme.
Find this code in header.php:
<?php // Header image section header_images(); ?>Replace it with this:
<?php // News header image section new_header_images(); ?>Once c.bavota updates Matheson you can reverse these changes if you want to use his updates.
Indeed, that is a better solution.
The .mfp-hide class works great to hide the box and then display it. So, no need to create additional css for that part.
Cheers.
Well, WordPress wouldn’t let me edit, so disregard that last post, it caused problems with featured images.
I made a Pastebin for my final solution.
Update I realized that if an individual blog post doesn’t have a featured image or custom header, then it will default to the main header, I wanted it to default to the header that is set on the blog page (from above).
This sets individual posts to have the same header as the blog page, but only IF there is no custom header or featured image for that page.
Here’s the function to replace header_images():
function header_images() { $custom_image = ( is_singular() OR is_home() ) ? get_post_meta( get_the_ID(), 'matheson_custom_image', true ) : ''; //set the blog_image $blog_image = get_post_meta( get_option('page_for_posts'), 'matheson_custom_image', true ) ; // check if we are on a singular page or the page set as the blog page if ( (is_singular() OR is_home() ) && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) { if ( $custom_image ) { echo '<img src="' . esc_url( $custom_image ) . '" alt="" class="header-img" />';} else { the_post_thumbnail( 'full', array( 'class' => 'header-img' ) );} } // if we are on a single blog post and there is no thumbnail set or custom image set, // then use the custom image set on the blog page if it is set. elseif (empty($custom_image) && !empty ($blog_image) && !has_post_thumbnail() && is_single() ){ echo '<img src="' . esc_url( $blog_image ) . '" alt="" class="header-img" />'; } else { $header_image = get_header_image(); if ( ! empty( $header_image ) ) : ?> <img class="header-img" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> <?php endif; } }(Its still a hack to the parent theme.)
CheersTo make the blog page display the custom header when using a static page as the home page:
Find in functions.php at around line 764:
function header_images() { $custom_image = ( is_singular() ) ? get_post_meta( get_the_ID(), 'matheson_custom_image', true ) : ''; if ( is_singular() && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) { if ( $custom_image )Replace with:
function header_images() { $custom_image = ( is_singular() OR is_home() ) ? get_post_meta( get_the_ID(), 'matheson_custom_image', true ) : ''; if ( (is_singular() OR is_home() ) && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) { if ( $custom_image )The only problem is that there is no action hook for this function, so you actually have to hack the parent theme.
-cheers
AJForum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Lightbox Inline ContentUnless I’m missing something key, it is not “intuitive” to get lightboxes to work.
Here’s an example of my solution:
Put this in your content:
[lightbox type="inline" src=".gift-box"] <h2>Click Here For Your Lightbox</h2>[/lightbox] <div class="gift-box"> This is what will pop up in the lightbox [bestwebsoft_contact_form lang=en]</div>add this to your theme .css file:
.gift-box { background: none repeat scroll 0 0 #FFFFFF; border: 2px solid #CCCCCC; border-radius: 5px; height: 50%; margin: 0 auto; padding: 25px; position: relative; width: 50%; } .gift-box { display: none; } .mfp-content .gift-box { display: block; } .su-lightbox > h2:hover { cursor: pointer; opacity: .6; }Unless I’m missing something key, it is not “intuitive” to get lightboxes to work.
Here’s an example of my solution:
Put this in your content:
[lightbox type="inline" src=".gift-box"] <h2>Click Here For Your Lightbox</h2>[/lightbox] <div class="gift-box"> This is what will pop up in the lightbox </div>add this to your theme .css file:
.gift-box { background: none repeat scroll 0 0 #FFFFFF; border: 2px solid #CCCCCC; border-radius: 5px; height: 50%; margin: 0 auto; padding: 25px; position: relative; width: 50%; } .gift-box { display: none; } .mfp-content .gift-box { display: block; } .su-lightbox > h2:hover { cursor: pointer; opacity: .6; }Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Lightbox Inline ContentUnless I’m missing something key, it is not “intuitive” to get lightboxes to work.
Here’s an example of my solution:
Put this in your content:
[lightbox type="inline" src=".gift-box"] <h2>Click Here For Your Lightbox</h2>[/lightbox] <div class="gift-box"> This is what will pop up in the lightbox </div>add this to your theme .css file:
.gift-box { background: none repeat scroll 0 0 #FFFFFF; border: 2px solid #CCCCCC; border-radius: 5px; height: 50%; margin: 0 auto; padding: 25px; position: relative; width: 50%; } .gift-box { display: none; } .mfp-content .gift-box { display: block; } .su-lightbox > h2:hover { cursor: pointer; opacity: .6; }