mwarner1
Forum Replies Created
-
I’m having this exact same issue and had a conversation with Yoast Premium support about it. Different people kept responding to my ticket every time I replied, which didn’t help.
Anyway, they ultimately passed the buck, taking the attitude that their plugin does what it’s supposed to do–namely, allow us to set individual pages to noindex–and if that thwarts Google Analytics goal tracking, then we need to take that up with Google.
I’m not optimistic about attracting the attention of a real human at Google on this, but maybe someone here has a suggestion. And of course any further information about this annoying issue would be helpful. I’ve found how-to articles on goal tracking of form thank-you pages set to no-index, which suggests this worked once upon a time, so this malfunction must be a new thing.
Glad I could help. I probably gave you more code than you needed.
* This was to fix my lightboxes . . .
I don’t know why the text editor cut off the beginning of my message.
My lightboxes on https://deenawarnerdesign.com/. Within functions.php:
/* hack to compensate for Custom Field plugin bug (Jan 2019) where image field returns ID instead of img src URL used in homepage, tag.php, and index.php */ function checkforimgurl($supposedurl) { // is .jpg or .gif in src URL? if (strpos($supposedurl, '.jpg') !== false) { return $supposedurl; } elseif (strpos($supposedurl, '.gif') !== false) { return $supposedurl; } else { // $supposedurl is an ID, so get the real src URL $large_url = wp_get_attachment_image_src($supposedurl,'full', true); $largeCover = $large_url[0]; return $largeCover; } }Then on the calling page:
<?php // lightbox for cover enlargment, or link to client if a website if ($newestcoverupload = get_post_meta($post->ID, 'newest-coverupload', true)) { echo '<a class="group1" href="' . $newestcoverupload . '" title=" ">'; } elseif ($largeimage = get_post_meta($post->ID, 'large_image', true)) { if (function_exists(checkforimgurl)) { $largeimage = checkforimgurl($largeimage); } echo '<a class="group1" href="' . $largeimage . '" title=" ">'; } elseif (isset($newestlink)) { echo '<a href="'.$newestlink.'" target="_blank">'; } ?>I’m experiencing the same problem. It would be nice if the developers fixed the bug in the next update.
In the meantime, we might have to program a workaround to grab the src URL.
Forum: Fixing WordPress
In reply to: Offset and Pagination with a Custom QueryJust as a followup to my previous post, I think I found a better way. The problem with the previous post is that the preference for posts per page is overridden; so, for example, if in your settings you said to post 10 posts and then the “continue” method I just outlined, you would only get 7 posts on the first page.
So, in my new and improved method, I passed the $skipIDs array into WP_Query as a post_not_in argument, and also passed in a $paged variable to get the correct posts. Here’s the code I’m working with now:
// Get IDs of first three items in "news" category (category 1), which will be skipped $skipIDs = ''; $query2 = new WP_Query( 'cat=1&posts_per_page=3' ); if ( $query2->have_posts() ) { while ($query2->have_posts()) { $query2->the_post(); $skipIDs[]=$post->ID; } } wp_reset_postdata(); $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $args = array( 'cat' => 1, 'post__not_in' => $skipIDs, 'paged' => $paged ); $query = new WP_Query($args); if ( $query->have_posts() ) { while ($query->have_posts()) { // post content $query->the_post(); the_title(); echo '<p> </p>'; }Forum: Fixing WordPress
In reply to: Offset and Pagination with a Custom QueryFWIW, I solved this problem today using a different method.
My task was to make sure my category page skipped the first three posts in that category:
// Get IDs of first three items in "news" category (category 1), which will be skipped $skipIDs = ''; $query2 = new WP_Query( 'cat=1&posts_per_page=3' ); if ( $query2->have_posts() ) { while ($query2->have_posts()) { $query2->the_post(); $skipIDs[]=$post->ID; } } wp_reset_postdata(); // now on to the Loop while ( have_posts() ) : the_post(); if ( in_array($post->ID, $skipIDs) ) { continue; }And then the Loop continues as normal.
Forum: Plugins
In reply to: [PB oEmbed HTML5 Audio - with Cache Support] Function for theme programming?Awesome. Thank you.
Forum: Themes and Templates
In reply to: Where is the gallery template "single.php" file?Nevermind! Apparently it’s image.php. Yay me.
Forum: Fixing WordPress
In reply to: Not all parent pages in page attributesThanks, I’ll do that! 🙂
Forum: Fixing WordPress
In reply to: Not all parent pages in page attributesOkay, I think I see what my problem is. In the Edit Page palette, the Parent dropdown is expanding to the right, with the left side of the pulldown options aligning with the left side of the palette. This means, that when a page title is long, the scroll bar is offscreen — and then I simply didn’t see that I could scroll down.
In the quick edit screen, the parent pulldown expands to the left, ensuring we can always see the scroll bar on the right.
I wonder if the CSS of the palette could be altered to accommodate this. I see that a similar issue came up with Drupal developers.
Forum: Fixing WordPress
In reply to: Not all parent pages in page attributesI’ve noticed this as well. I’m currently developing a site with a LOT of pages that all need to be structured via parent-child relationships.
The problem is with the Page Attributes palette of the Add New Page & Edit Page screens. The Parent pulldown only shows 17 page options. To find the parent I want, I must go out to the All Pages listing, click the Quick Edit link for the page, and specify the parent from the list under the Parent pulldown options there.
Should the pulldown for the Page Attributes palette be upgraded in a future WP version?
Forum: Requests and Feedback
In reply to: Add an Image: add target=_blankIf that’s the logic for not having it for “Add an image,” then why does the “Insert/edit link” tool have it?