astromono
Forum Replies Created
-
Forum: Plugins
In reply to: [Optimize YouTube Video Embed] Vimeo SupportThanks for the prompt reply. I like the idea behind the plugin, but maybe it could be easier for the user to use it. For instance, what if the plugin grabbed the static image preview from youtube itself? I’ll keep testing and writing about what I find.
This is a great idea tho!
Forum: Developing with WordPress
In reply to: ‘get_recent_posts’ Not Working for Custom Post TypeOh wow, thank you so much for such a quick reply, you guys! And thank you, Michael, that was exactly right! (hear me go DO’H and wake my roommates at 1am).
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemThanks, I can try using it and letting you know, but it will still leave the video embeds looking all weird. Is there any fix for that?
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemHi! Sure I can, here’s the link to the gist:
https://gist.github.com/luislandero/3c6e66061074a29b3f032000ca754291
If you need any additional files or info, please let me know and thank you so much for getting this far with me into resolving this.
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemHi!
Thank you for the reply. The value without the
if ( is_page_template( 'full-width.php' ) )is how I initially had it and if you go to this link, we’re right back at the beginning of the issue.http://astromono.com/top-10-e3-2015-playstation/
Setting the content_width that way affects not only the full-width images, but also the images inside tiled galleries and even the preview images in Youtube videos.
In all fairness, at least Photon is now serving the correct image size in full width, not just serving the resized 948px width version scaled to 1038px.
Is there a fix?
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemCertainly!
The parent theme has a
$content_width = 474;by default. My child theme’s $content_width is defined as follows:if ( ! isset( $content_width ) ) $content_width = 474; function astra_adjust_content_width() { global $content_width; if ( is_page_template( 'full-width.php' ) ) $content_width = 1038; } add_action( 'template_redirect', 'astra_adjust_content_width' ); add_action( 'after_setup_theme', 'thumbnail_size_tweak', 11 ); function thumbnail_size_tweak() { set_post_thumbnail_size( 1038, 572, true ); }The value is for all templates, regardless of whether it’s a page or post.
The HTML generated by the image in the editor is the following:
<p class="full-image"><img class="alignnone wp-image-2730 size-full" title="My E3 2015 Top 9: Microsoft" src="http://en.astromono.com/wp-content/uploads/sites/2/2015/06/fortnitebig.jpg" alt="My E3 2015 Top 9: Microsoft" width="1038" height="572" /></p>Sorry for the late reply, but I hope this info helps.
One additional thing I noticed is that, if you inspect the images that appear in the post, you’ll see that the WordPress CDN is serving the images at a max width of 948px for some reason, even though the images themselves are bigger (1038px wide).
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemQuick update. I installed the Fluid Video Embeds plugin and the video issue is now solved, however if you look at full-width template pages, I have full width images being served at the wrong size.
Here’s an example:
http://astromono.com/top-10-e3-2015-playstation/
My $content_width is set at 1038px, but Photon is resizing the image to 948px while still stretching it to fit the 1038px width of the column. If I deactivate Photon, images are served at full size (as they should be), but then I won’t be able to use tiled galleries and they will load slightly slower.
What’s causing this?
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemHi, Jeremy!
Thanks a lot for your reply. I tried the new code and while it does work perfectly for images, my Youtube embeds are still off in that they “hang” from one side as opposed to appearing with 100% column width. Here’s an example:
http://en.astromono.com/design-focus-guild-01-%e2%80%a2-liberation-maiden/
I tried editing this behavior with CSS and even though it did get the video to appear with the width of the container (1038px), the video is not responsive as it used to be.
Thanks again for the awesome suppport!
Luis
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Image ProblemSorry, forgot to say thanks in advance for any help you can provide!
Luis
Forum: Themes and Templates
In reply to: [Theme: TwentyFourteen] Make custom template for a specific tagJust bumping this up. I’m still struggling with it now that I updated to 1.3. Can anyone help me out, please?
Forum: Themes and Templates
In reply to: [Theme: TwentyFourteen] Make custom template for a specific tagStill trying. This is my latest attempt, but it doesn’t pull up any posts at all.
<?php /* * Template Name: Pateando Calle * Description: Page Template for Pateando Calle travel articles. */ get_header(); ?> <div id="main-content" class="main-content"> <?php if ( is_front_page() && twentyfourteen_has_featured_posts() ) { // Include the featured content template. get_template_part( 'featured-content' ); } ?> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); /* * Include the post format-specific template for the content. If you want to * use this in a child theme, then include a file called called content-___.php * (where ___ is the post format) and that will be used instead. */ get_template_part( 'content', get_post_format() ); endwhile; endif; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $list_of_posts = new WP_Query( 'tag=pateando calle' ); if ( $list_of_posts->have_posts() ) : /* The loop */ while ( $list_of_posts->have_posts() ) : $list_of_posts->the_post(); // Display content of posts get_template_part( 'content', get_post_format() ); endwhile; // Previous/next post navigation. twentyfourteen_paging_nav(); else : // If no content, include the "No posts found" template. get_template_part( 'content', 'none' ); endif; ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar( 'content' ); ?> </div><!-- #main-content --> <?php get_sidebar(); get_footer();Nevermind, guys!
Solved it (with a bit of help) by using this code:
// Add specific CSS class by filter add_filter( 'body_class', 'my_class_names' ); function my_class_names( $classes ) { if ( get_post_type() == 'am_extra' ) { if ( is_single() ) { // add 'class-name' to the $classes array $classes[] = 'full-width'; } } // return the $classes array return $classes; }It adds the full width class only to single posts that use the “am_extra” template for my registered post type. I think it’s neat in that it’s short and won’t get wiped out if we ever get a new twenty fourteen version.
Cheers,
Luis
Hi, I tried to add the following code to a child theme. It’s supposed to call a custom post type template I made but every time I try it, I get a blanks screen and WordPress breaks:
function astra_body_classes( $classes ) { if ( ( ! is_active_sidebar( 'sidebar-2' ) ) || is_page_template( ‘page-templates/single-am_extra.php' ) $classes[] = 'full-width'; return $classes; } add_filter( 'body_class', 'astra_body_classes' );Please help!
Thanks!
Forum: Fixing WordPress
In reply to: Can't access Network Admin or Admin for Main BlogUpdate: the main blog http://www.astromono.com is down as well and gives the same error as above.
Forum: Fixing WordPress
In reply to: Password Reset Email BugIs anyone experiencing this as well?