Forum Replies Created
-
AuthorPosts
-
June 29, 2022 at 2:56 am in reply to: Creating custom post templates for different categories? #505484lvvvvvlParticipant
Thank you Brad, that looks really helpful. I can't see that Foodie pro uses any category templates as they have some 'modern category' setup: https://feastdesignco.com/modern-categories/ but I'll see if I can work around that somehow.
lvvvvvlParticipantOh I see. I've been using Yoast SEO so maybe that's responsible for adding an ALT field to images so I can specify what I want as my alt tag which is what I've been doing since I started my blog.
lvvvvvlParticipantYou're a legend, for some reason editing the single.php didn't even cross my mind too absorbed in the complicated method. Thank you!
July 4, 2018 at 1:08 am in reply to: Displaying the search box in mobile menu width of Essence Pro #221318lvvvvvlParticipantHey Brad,
Love wpsites, it's been very useful. I think it would look best at the very top of all the navigation links. What do you think?
lvvvvvlParticipantOh, that would make sense. Awesome, thanks Victor, I'll give it a try.
While researching how to fix this I stumbled across this https://make.wordpress.org/core/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/ and how they mentioned not to use wp_print and instead wp_queueu so it focused my research on the wrong direction I think.
lvvvvvlParticipantMy permalinks settings only offer options on how to display the posts (day and name, month and name or plain) and not the url structure of the category (apart from the option of renaming the category base).
July 26, 2016 at 7:11 pm in reply to: Is my custom code making use of the srcset functionality? #190250lvvvvvlParticipantThanks for your response Brad.
I'm currently working on it on a local pc but this is the code that renders in the featured image div: http://pastebin.com/ARaCqrJy
I can see it render the srcset info with a variety of sizes, but being unfamiliar with srcset I'm not sure if that's correctly rendered.
July 21, 2016 at 2:06 am in reply to: Checking custom field exists; where did I make a mistake? #189887lvvvvvlParticipantThat was it, awesome! Thanks Brad.
July 3, 2016 at 6:48 pm in reply to: Genesis Simple Slideshow not loading after jquery sent to the Genesis Footer #188816lvvvvvlParticipantCheers for all your help, I'll look into these scripts further. You're a legend!
July 3, 2016 at 4:06 am in reply to: Genesis Simple Slideshow not loading after jquery sent to the Genesis Footer #188793lvvvvvlParticipantThanks Christoph.
The issue I'm having is due to letting the plugin handle the script. It's creating an unnecesary extra load in resources and load time in every page, and I was hoping I could load it conditionally only on the pages that use Genesis Responsive Slider instead of every page.
Is this possible at all?
July 2, 2016 at 4:37 am in reply to: Genesis Simple Slideshow not loading after jquery sent to the Genesis Footer #188751lvvvvvlParticipantThanks Christoph.
I've tried your suggestion, and it still doesn't appear for some odd reason.
This is the link of the test website if it helps: http://goo.gl/qTZFYs
June 30, 2016 at 10:45 pm in reply to: Genesis Simple Slideshow not loading after jquery sent to the Genesis Footer #188702lvvvvvlParticipantI see, after your advice and the article I'll use the wordpress jquery and see how it goes. 🙂
I've modified the code according to the helpful codex links, this is what I got:
// Dequeue css and js for Genesis Slider function my_dequeue_styles() { wp_dequeue_style( 'slider_styles' ); } function my_dequeue_javascript() { wp_dequeue_script( 'flexslider' ); } // Conditionally load css and js for Genesis Slider function my_enqueue_style() { if( is_front_page() ) { wp_enqueue_style( 'slider_styles', false ); } } function my_enqueue_script() { if( is_front_page() ) { wp_enqueue_script( 'flexslider', true ); } } add_action( 'wp_enqueue_scripts', 'my_enqueue_style' ); add_action( 'wp_enqueue_scripts', 'my_enqueue_script' );
So even if jquery is now loading in the header, it still doesn't show the slideshow. With Inspect Element I see these errors:
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://xxxxxxxxxxxx.com1/?ver=4.5.3
(index):185 Uncaught TypeError: $(...).flexslider is not a functionJune 30, 2016 at 8:29 pm in reply to: Genesis Simple Slideshow not loading after jquery sent to the Genesis Footer #188698lvvvvvlParticipantThanks for the response Christoph.
I've heard from a variety of websites (e.g: http://www.wpbeginner.com/wp-themes/replace-default-wordpress-jquery-script-with-google-library/) to load jquery from the Google CDN as it's not only likely that it's already cached in the visitor's browser, but their CDN servers deliver it faster than my website ever could.
I agree, images are really high in loading time which is why my website is free from images apart from the slideshow images in the front page. If I can avoid WordPress having to load a couple of extra files unnecessarily there's no harm in trying.
How would I go about avoiding wp_print_styles in favor of wp_enqueue_script with a true or false statement?
May 19, 2016 at 3:21 am in reply to: Will changing my current child-theme to a new one affect my SERP? #185885lvvvvvlParticipantI'm using the Swank child theme: https://prettydarncute.com/demos/swank/ (apologies for the bit.ly above, I don't like getting forum backlinks).
May 18, 2016 at 3:36 am in reply to: Will changing my current child-theme to a new one affect my SERP? #185817lvvvvvlParticipantFebruary 2, 2016 at 10:18 pm in reply to: Would "is_plugin_active" function be right for this purpose? #178220lvvvvvlParticipantI wrote a script that loads the facebook library on a 3 second delay using javascript on every page. But it can't be that as even if the FB comment loading was failing, it would at least display the H3 Comments title which it doesn't. It only loads the Advertisement and Social Buttons and nothing under that.
February 2, 2016 at 9:53 pm in reply to: Would "is_plugin_active" function be right for this purpose? #178217lvvvvvlParticipantI tried adding $content but it didn't work either. I thought maybe since I disabled comments in pages the genesis_comments hook wasn't working so I decided to add it to an existing manually implemented shortcode that is working at the bottom of pages (my advertisement and share buttons), I ended up with:
add_action('genesis_entry_footer', 'tests_bottom', 1 );
function tests_bottom() {
if (is_page()) {
echo do_shortcode('[the_ad id="xxx"]<br />');
echo do_shortcode('<div class="sharer">Enjoyed This? Share It!</div>[easy-social-share buttons="facebook,twitter,stumbleupon,mail" counters=1 counter_pos="hidden" total_counter_pos="rightbig" style="button" twitter_user=""]');
if( has_shortcode( $content, 'viralQuiz' ) ) {
?>
<h3>Comments</h3>
<p><div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="100%" data-numposts="5" data-order-by="social" data-colorscheme="light"></div></p>
<?php }
if ( function_exists( 'get_yuzo_related_posts' ) ) {
get_yuzo_related_posts();
}
}
}They FB comments still don't appear, though neither does the Yuzo Related posts work on pages for some reason, yet the exact same code when applied to is_single does.
February 2, 2016 at 9:04 pm in reply to: Would "is_plugin_active" function be right for this purpose? #178214lvvvvvlParticipantI've added this as my function:
remove_action( 'genesis_list_comments', 'genesis_default_list_comments' ); remove_action( 'genesis_comment_form', 'genesis_do_comment_form' ); add_action('genesis_comments', 'wpa_fb_comments' ); function wpa_fb_comments() { if (has_shortcode('viralQuiz')) { ?> <h3>Comments</h3> <p><div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="100%" data-numposts="5" data-order-by="social" data-colorscheme="light"></div></p> <?php } }
It doesn't seem to appear for some reason though. Is it because I didn't add the $content parameter?
February 2, 2016 at 5:42 pm in reply to: Would "is_plugin_active" function be right for this purpose? #178195lvvvvvlParticipantThanks guys for the suggestions, I'll try Brad's idea as it will involve less editing of existing pages. 🙂
February 1, 2016 at 9:41 pm in reply to: Would "is_plugin_active" function be right for this purpose? #178121lvvvvvlParticipantThanks Victor for your response.
The reason I wanted to use something like this rather than is_page is because I already have over 50 tests so adding the ID manually everytime would be really time consuming. Since there's no Category option for pages, I'm not sure exactly how I could group all these tests so as to load FB comments solely on these pages.
Would there be some custom function or plugin (preferably function, to avoid extra plugin load baggage) I could use to do something like this?
-
AuthorPosts