Mr Case
Forum Replies Created
-
Forum: Plugins
In reply to: [Yoast SEO] Url breadcrumbs not updated to https protocolYES! I recently did an audit and noticed that my site (which is forced SSL) had breadcrumb links that were not https:! Wish there was a way to make sure that the links were https: I will use the function left by Daniel until this is fixed.
Forum: Developing with WordPress
In reply to: Add Alt Text To Featured ImageOn the page you sent there is alt text on the image already. What exactly is the issue you are having?
Forum: Developing with WordPress
In reply to: Word counter in realtime in metaboxIf you are using Gutenberg there is already this information just 1 click away. In the top left corner is a little information button (content structure) which will show you information about the block content you have below.
Why not use this?
Forum: Fixing WordPress
In reply to: Editing functions.php using wordpress codex. how to do the basics?Normally the functions.php file is the place to go to change core stuff about your theme, but in this case you may want to search your ‘comments.php’ file. Around line 73 you will find:
comment_form( array( 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', 'title_reply_after' => '</h2>', ) );
just add your code so it looks like this:
comment_form( array( 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', 'title_reply_after' => '</h2>', 'label_submit'=>'Have Your Say', ) );
however, if I were you I would look into creating a child theme before you made any changes to your existing theme. It’s very easy and will save you a ton of headache in the future! (especially if your theme is updated)
Forum: Fixing WordPress
In reply to: Hide Menu bar in Cuda ThemeIf you have a place to add custom CSS try this:
header nav { display: none; }
should take care of both.
Forum: Fixing WordPress
In reply to: If Featured Image Exists Use As Header ImageSo this is in your header file? I take it that it comes BEFORE your loop then. Try passing the ‘$post->ID’ variable into a different function ‘get_the_post_thumbnail()’ like this:
<?php do_action('sydney_after_header'); ?> <div class="sydney-hero-area"> <?php sydney_slider_template(); ?> <div class="header-image"> <?php sydney_header_overlay(); ?> <img class="header-inner" src="<?php if( has_post_thumbnail($post->ID) ) { echo get_the_post_thumbnail($post->ID); } else { header_image(); } ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"> </div> <?php sydney_header_video(); ?>
and see if that does anything. You should also inspect your code in your browser to see what gets output each time. it helps troubleshoot things like this.
Forum: Fixing WordPress
In reply to: If Featured Image Exists Use As Header ImageIs this line of code inside your loop? if so maybe you don’t need ‘$post_id’. and also, I don’t think ‘$post_id’ is a core global variable…I could be wrong though. So if your code is outside the loop maybe try ‘$post->ID’ instead?
Forum: Fixing WordPress
In reply to: while() and newline (\n), how does it make sense?ok. it seems you are using a plugin called PODS. I would recommend looking at their documentation as they may have specific functions that may help you better.
Forum: Fixing WordPress
In reply to: while() and newline (\n), how does it make sense?Ok. I looked a little longer at what I think you are trying to do.
Get all post from custom post type ‘activity’ that HAVE a post meta value?
Maybe just change the values of your query first?
<?php $args = array( 'post_type' => 'activity', 'posts_per_page'=>'-1', 'meta_key' => 'activities_label', 'compare' => 'EXISTS' ); $query = new WP_Query($args); while($query->have_posts()) : $query->the_post(); $activities_label = get_post_meta(get_the_id(), 'activities_label', true); echo "<br>".get_the_title()."<br>".$activities_label."<br><br>"; endwhile;
Forum: Fixing WordPress
In reply to: while() and newline (\n), how does it make sense?Its hard to tell what you have going on so everything I say here is just a wild guess. My next guess would be to remove your conditional statement, for testing purposes, just to make sure something is getting echoed.
$activities = get_post_meta(get_the_ID(), "activities", false); $ids = array_column($activities, 'ID'); $args = array( 'post_type' => 'activity', 'posts_per_page'=>'-1', 'post__in' => $ids, 'orderby' => 'post__in', ); $query = new WP_Query($args); while($query->have_posts()) : $query->the_post(); $activities_label = get_post_meta(get_the_id(), 'activities_label', true); echo "<br>".get_the_title()."<br>".$activities_label."<br><br>"; endwhile;
please show me what happens with that.
Forum: Fixing WordPress
In reply to: while() and newline (\n), how does it make sense?maybe move the ‘activities_label’ variable INSIDE the loop?
$activities = get_post_meta(get_the_ID(), "activities", false); $ids = array_column($activities, 'ID'); $args = array( 'post_type' => 'activity', 'posts_per_page'=>'-1', 'post__in' => $ids, 'orderby' => 'post__in', ); $query = new WP_Query($args); while($query->have_posts()) : $query->the_post(); $activities_label = get_post_meta(get_the_id(), 'activities_label', true); echo "<br>".get_the_title(); if (strpos($activities_label, "\n") !== false || false !== strstr($activities_label, PHP_EOL)) { echo "<br>".$activities_label."<br><br>"; } endwhile;
Forum: Fixing WordPress
In reply to: while() and newline (\n), how does it make sense?can you try this? just switched one of the functions and changed the logical operator.
$activities_label = get_post_meta(get_the_ID(), 'activities_label', true); while ($query->have_posts()) { if (strpos($activities_label, "\n") !== false || false !== strstr($activities_label, PHP_EOL)) { echo $activities_label; } }
and sorry, but i’m and old fashioned curly brackets kind of guy, not one of those new line, curly brackets guys though…those guys are weird
Forum: Fixing WordPress
In reply to: Shortcode Stopping Next Shortcode on Pageyou say “custom shortcodes” i take it you wrote some custom functions? possibly in your functions.php file? can you share the code for your “custom shortcodes”?
Forum: Fixing WordPress
In reply to: Looking for a interactive graph pluginOff the top of my head I do not know of any plugins, but Google offers their Google Charts service for free. With a custom form, some custom javascript and the Google charts you could accomplish this.
Forum: Fixing WordPress
In reply to: problemas com o CSSQual é o URL do seu site? Com qual página ou páginas você tem problemas? Que parte da página está causando problemas?