Forum Replies Created
-
AuthorPosts
-
Sorry, false alarm, I guess I figured that out — I just removed the class in the function, right below that comment, so the code now looks like as shown below. But that didn’t handle what I was hoping it would also solve which is, once I click on a child page, the menu title changes to the parent of that child. Is there a way to tweak this code so that the title doesn’t change when you click on the child (i.e., so the menu/section title stays the same for the whole section)? Maybe you want me to start a new thread for this?
function avia_sidebar_menu($echo = true) { $sidebar_menu = ""; $subNav = avia_get_option('page_nesting_nav'); $the_id = @get_the_ID(); $args = array(); global $post; if($subNav && $subNav != 'disabled' && !empty($the_id) && is_page()) { $subNav = false; $parent = $post->ID; $sidebar_menu = ""; if (!empty($post->post_parent)) { if(isset($post->ancestors)) $ancestors = $post->ancestors; if(!isset($ancestors)) $ancestors = get_post_ancestors($post->ID); $root = count($ancestors)-1; $parent = $ancestors[$root]; } $args = array('title_li'=>'', 'child_of'=>$parent, 'echo'=>0, 'sort_column'=>'menu_order, post_title'); //enables user to change query args $args = apply_filters('avia_sidebar_menu_args', $args, $post); //hide or show child pages in menu - if the class is set to 'widget_nav_hide_child' the child pages will be hidden $display_child_pages = apply_filters('avia_sidebar_menu_display_child', $args, $post); $children = wp_list_pages($args); if ($children) { $default_sidebar = false; $parent = get_the_title($post->post_parent); $parentlink = get_the_permalink($post->post_parent); $sidebar_menu .= "<nav class='widget widget_nav_menu $display_child_pages'><ul class='nested_nav'>"; $sidebar_menu .= "<h3 class='widgettitle'><a href='{$parentlink}'>$parent</a></h3>"; $sidebar_menu .= $children; $sidebar_menu .= "</ul></nav>"; } } $sidebar_menu = apply_filters('avf_sidebar_menu_filter', $sidebar_menu, $args, $post); if($echo == true) { echo $sidebar_menu; } else { return $sidebar_menu; } }
Thanks, you can close it.
OK, fair enough, thanks anyway.
OK, now it’s back to showing the alternate logo for all mobile views, including iPad Pro landscape (1366px wide), which is the only mobile layout I have using the desktop layout (left column layout). So, I’m still hoping to get the default logo to show in that iPad Pro landscape layout. One more try? ;)
Thanks again and let me know if you have any other questions.
Thanks, but I don’t have all the mobile devices needed to check on actual mobile devices. But I see a change in the Chrome Inspector Emulator — now it looks like the alternate logo is only being used up to max width 768 — I need it for set to max width 1024.
Thanks again and let me know if you have any other questions.
Thanks, Basilis, but I’m sorry, I don’t actually “know” php, and I can’t seem to figure out how to use this code. So, now I have both snippets in there, as shown below. Do I need one of those “add_filter” or “add_action” lines for this new snippet to work?
BTW, I added some css so that the only mobile version still using the Left Column Layout (and therefore still needing the default logo) is iPad Pro landscape (or anything above 1024px wide, so that’s all I need to target in terms of still using the default logo for mobile.
So can you help me tweak this so the default logo is still used on mobile devices with a viewport wider than 1024px (like iPad Pro landscape)?
Thanks and let me know if you have any other questions.
`function custom_wp_is_mobile() {
static $is_mobile;if ( isset($is_mobile) )
return $is_mobile;if ( empty($_SERVER[‘HTTP_USER_AGENT’]) ) {
$is_mobile = false;
} elseif (
strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Android’) !== false
|| strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Silk/’) !== false
|| strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Kindle’) !== false
|| strpos($_SERVER[‘HTTP_USER_AGENT’], ‘BlackBerry’) !== false
|| strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Opera Mini’) !== false ) {
$is_mobile = true;
} elseif (strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Mobile’) !== false && strpos($_SERVER[‘HTTP_USER_AGENT’], ‘iPad’) == false) {
$is_mobile = true;
} elseif (strpos($_SERVER[‘HTTP_USER_AGENT’], ‘iPad’) !== false) {
$is_mobile = false;
} else {
$is_mobile = false;
}return $is_mobile;
}add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo) {
if(wp_is_mobile( ) )
{
$logo = “http://03601fe.netsolhost.com/wordpress1/wp-content/uploads/desert-tortoise-council-logo-horizontal.png”;
}
return $logo;
}Nice, that works — I just had to then add some css to hide those widgets in mobile views, when the header switches to top/horizontal, Thanks Mike!
May 21, 2018 at 4:54 pm in reply to: Change when Enfold switches to Mobile while using left main menu. #959854Nice, that works! Thanks, Victoria!
May 21, 2018 at 10:40 am in reply to: Change when Enfold switches to Mobile while using left main menu. #959631Thanks, haydaw, but when I use your code (and remove any media queries I had pertaining to the header), the burger/mobile menu disappears — are you not having that issue?
Enfold team, can you provide a solution for switching to the horizontal header for any view less than 1024px wide? I’ve always found the tablet/portrait layouts to be too scrunched/crowded/cramped with the left/right column layout.
My site is hidden from the public, but I’ve provide credentials in the Private Content field.
Thanks and let me know if you have any questions.
Ahh, well, it looks/sounds to me like you’re adding a widget area via custom code, but adding that widget area is an option already available in the theme, in the General Layout pane, when you have the Left Sidebar Layout selected (see screen grab linked below). So when you do it that way, I’m guessing it’ll be the same as mine.
So is that the best solution; to add the widget via code instead of the theme option? I went ahead and created a user for you, so you can access the site (including in Private Content field).
Thanks and let me know if you have any other questions.
IT’s at a development url and there’s a plugin preventing the public from viewing it. Please don’t take this wrong, but aren’t the screen grab and my explanation sufficient? It seems like a pretty basic concept/question, to me.
April 16, 2018 at 7:45 pm in reply to: Fullwidth Easy Slider > Image Link > Single Entry > Post limit in dropdown? #942733OK, thanks, standing by.
OK, thanks. We do have the Yoast plugin installed, but Integrating that code with what you gave me above is a little over my head, apparently (just tried it, to no avail). If you feel like showing me how that’d work, please do.. Otherwise, I’ll just hope my client can keep posts in just one category for now, and if not I’ll jump back into this.
Thanks again!
Yeah, this client needs to clear IPs for me to work on the site — can you give me an IP I can ask them to clear for you? Thanks!
OK, I give up — I think we have a sufficient workaround for this using the offset option in the Magazine elements anyway — thanks anyway.
Thanks, but that doesn’t seem to change anything — if there’s nothing entered in the image/media caption field, it still shows the post title as the image caption, on the front end. Got anything else for me? :)
April 13, 2018 at 6:29 pm in reply to: Fullwidth Easy Slider > Image Link > Single Entry > Post limit in dropdown? #941637Thanks for looking, Victoria — is there anyone else on the team you could ask?
Ooh, yeah, that’s much better — that handles the title styling properly, too, so I don’t have to modify that. But it’s too tricky to get multiple categories to show? And if it can only show one, how is it choosing that one — it doesn’t seem to be choosing the Primary Category — do you know how it chooses which category to use as the title?
Thanks!
Here’s what our IT guy said about that: “I need specific ips for them because it doesn’t do it by country (and I don’t know what ips are for what countries).” — anything you can do for me?
April 12, 2018 at 2:27 am in reply to: Fullwidth Easy Slider > Image Link > Single Entry > Post limit in dropdown? #940733Huh? This is the original ticket. @dlikat jumped in and asked some other question and you told here to create a different ticket, but nobody has gotten back to me on this one. Right before @dlikat jumped in, I had given you access (on April 4th, above). If I try to reply to that ticket, it just jumps me down here again. Am I missing something?
April 11, 2018 at 5:33 am in reply to: Fullwidth Easy Slider > Image Link > Single Entry > Post limit in dropdown? #940196But what about the original ticket — you still haven’t responded since I gave you access on the 4th.
Thanks!
Remove the custom post title? Sorry, I don’t understand that one — could you elaborate on that, please?
Thanks
Nice, that’s a good step in the right direction! I added the h1 tag around it (see below), like the other, category header titles, so they look the same.
But there’s no way to show the other categories? Posts are so often in more than one category. Sorry to press on this, but if a user is browsing one category, clicks on a post, and then is taken to a page with a different category title, that’d be pretty confusing, I think.
Oh, also, this category just links to the home page — can we make it link to the archive page for that category?
Thanks again!
add_filter('avf_title_args', 'avf_title_args_mod_category', 10, 2); function avf_title_args_mod_category($args, $id) { $categories = get_the_terms(get_the_ID(), 'category'); foreach($categories as $category) { $args['title'] = '<h1 class="main-title entry-title">'.$category->name.'</h1>'; } return $args; }
Ah, great, perfect — that worked — thanks!
Just worked for me, but I have used these credentials for a few, recent tickets — maybe two of you were trying to log in at the same time…?
Oh, cool, great Hmm, I wonder what changed… oh well, all’s well that ends well! Thanks anyway — sorry to waste your time!
Sure (credentials in PC) — I have those header titles hidden with css, for single post pages — they do work on Archive pages (e.g., https://www.waternewsnetwork.com/category/education/ or see screen grab https://www.evernote.com/shard/s320/sh/f56ed5ba-d7de-42b5-b9a9-fc766663abe6/51e8181ecd261d785ddcde3181c15aca ) — If I could just show “Category: Education” or just “Education” in that strip for all posts in the Education category, that’d be perfect.
Thanks and let me know if you have any other questions!
Sure thing:
OK, that one’s cleared now.
April 4, 2018 at 6:09 pm in reply to: Fullwidth Easy Slider > Image Link > Single Entry > Post limit in dropdown? #937333Sure thing (in private content) — If you edit the Fullwidth Easy Slider on the Frontpage/Home and try to link one of those slides to a post via the Image Link option under the Caption tab, you should see that only posts up through the letter P are available, even though we have plenty of posts available with titles starting with letters after that in the alphabet.
Thanks!
-
AuthorPosts