z-247
Forum Replies Created
-
Forum: Plugins
In reply to: [Admin Menu Editor] Editors can't access menu itemsThanks for the quick reply!
I’ve enabled logging, and then tried to access the specific settings page by just jumping to the URL (since the menu is of course hidden). The log seems slightly contradictory?
You do not have sufficient permissions to access this admin page. Admin Menu Editor security log Current URL: "https://mywebsite.com/wp-admin/admin.php?page=wp-cart-for-digital-products%2Fwp_eStore1.php" The current menu item is "WP eStore", menu template ID: ">wp-cart-for-digital-products/wp_eStore1.php" =============================================================================== Figuring out what capability the user will need to access this item... Checking "WP eStore" permissions: + Custom permissions for user "USERNAME": ALLOW. = Result: ALLOW ----- Skipping a "add_users" capability check because we've already determined that the current user should have access. No "extra capability" set. Final capability setting: add_users =============================================================================== The current user does not have the "add_users" capability. DENY access.
I then checked the Capabilities set by User Role Editor, and while the Add Users box is checked for editors to try and match the necessary criteria, editors still can’t do anything on the ../wp-admin/user-new.php page, so that’s somehow not working. Of course, Admin Menu Editor used to allow editors to see the eStore plugin on its own, so hopefully we don’t have to start going too far with adding new roles here.
Thanks for your help!
Forum: Fixing WordPress
In reply to: Can't update/edit posts in 3.5Any tips on this? I’ve got a site that’s doing the same thing. Clicking ‘Update’ for any Page or Post just takes me to the 404 Not Found page.
I was using Handbrake (free here: https://handbrake.fr/) which, among the various presets and options, has a checkbox for “Web optimized.” I think the other things to check are that you’re using the H.264 codec and it’s an mp4, although m4vs might work as well (I never tested that one.)
I think I’ve solved this by making sure my .mp4 file was “web optimized” when encoding it. IE videos now properly play while continuing to download, rather than stalling until they’re totally downloaded.
Forum: Fixing WordPress
In reply to: Can't access admin area as Administrator, but I can as an EditorWell, it appears that it was a problem with the server. It’s ‘coming back’ for the most part now after my hosts have been working on it. If I ever get more details, I’ll try to share them for posterity.
Sorry about my lame description.
I just meant that all the other formatting I’ve applied through Events > Settings work. The only formatting that seems to be ignored is the events page group headings.
Here’s a screenshot of the field I’m having trouble with, in case my description still isn’t helpful: https://i.minus.com/ihoyasGWJbN2u.jpg
Is there just some place in the templates where I could edit these? I wouldn’t mind being able to add a class/name to the resulting <h2> tags…
Thanks,
Z-247
Thanks, aglonwl,
Although I’m realizing that my original question may not have really addressed my goal well enough (or I’m missing how to connect what you gave me to what I’m doing.)
I’ve got my events-list page grouped Daily, and I’m just trying to plug in an anchor with the name of each day of the week next to each day’s title. Something like this:
<h2>Wednesday</h2><a name="Wednesday"></a>
On the Events Page formatting options, I started with
<a name="#l"></a>
in the “Default event list format header” section, but the placeholder doesn’t convert. I just get<a name="#l"></a>
again. Is this because when it’s loading the format header, there’s no event to pull a day from, even though the day for the daily grouping is already there?The code you gave me worked on the individual event posts, of course, outputting the name in the head. But can it be applied to the events list somehow as well? I couldn’t get it to show up anywhere there, even with a few modifications (like just having it echo it’s results.)
I’ve looked in the templates/events-list.php file, and I see references to
$args['mode'] = get_option('dbem_event_list_groupby'); echo em_events_list_grouped($args, get_option('dbem_event_list_groupby_format',''));
I’m not seeing where that gets to specific elements (like why the daily grouping titles are <h2> instead of <h3>, for instance.)
Thanks for your help,
Z-247
Sorry for the delayed reply here; I was off the grid for a couple days. I think I’ve cleared this up, and it may have all been my fault.
I’ve tested the ‘outside the loop’ code from Marventus (version 2a), using sub-title as test_field/$field1 and guest_author_name as test_field2/$field2. The result is that $field1 comes back as nothing (no space, etc.) and $field2 displays as expected.
I’ve also confirmed that sub-title is indeed hyphenated, and not with an underscore.
When double-checking the ACF settings, I noticed that my test subtitle wasn’t matching what I expected for my test Post. The subtitle displayed after the guest author output, the ‘out of order’ one, had actually been inserted into the content, not a custom field. So while I’d been seeing an expected subtitle in my HTML output, it was coming from dummy text entered over a month ago (which nicely explains why the custom field calls were failing!)
Very sorry for the wild goose chase there- I wish I’d caught that earlier, but really appreciate both of your efforts to help me pin this down. If only there were a tip jar around here for you guys.
Z-247
Thanks, Marventus. You are correct about using Advanced Custom Fields. Unfortunately, the reset query didn’t do it, and neither did the get_post_meta idea, assuming the following implementation looks correct:
function AltGetSubTitle(){ $pageID = get_the_ID(); $subTitle = $post_meta_cache[$pageID]['sub-title']; echo '<h3>'.$subTitle.'</h3>'; } function AltGuestAuthor(){ $pageID = get_the_ID(); $GuestAuthor = $post_meta_cache[$pageID]['guest_author_name']; echo '<span class="byline">'.$GuestAuthor.'</span>'; }
Actually, this produces a new result: The subTitle is displayed after the Guest Author line in HTML, but now the GuestAuthor comes up blank… I then tried this new variation of the subTitle with the earlier $GuestAuthor = get_field(‘guest_author_name’); version of GuestAuthor, and while the Author is displayed again, the subTitle still comes in in the wrong place.
Any clues there?
Sorry to take so long to get back to this. The proposed solutions never seemed to work for some reason. I was planning on tweaking the excerpt a bit anyway, so I got started on that function in the mean time. This tinkering revealed that if I used get_the_content() instead of get_the_excerpt(), I didn’t need any remove_filter. The original WP_Query seemed to be sufficient. But if I used get_the_excerpt(), remove_filter never seemed to help.
So as my personal workaround, I’ve just set things up to build a custom excerpt, starting from scratch with get_the_content() and stripping and shortening from there. But I wanted to report back in case the difference between the_excerpt and the_content helped someone.
-Z-247
Sorry for the bump, but I’m trying to follow this, and I’m not sure where the category search should be added to the ical.php file.
as per smarru’s blog post, I started with getting the category id:
$uri=$_SERVER['REQUEST_URI']; $args=explode('/',$uri); /* Get the category ID */ if($args[1]=='events' && $args[2]=='categories') { $cat_name=$args[3]; $cat_obj=get_term_by('name', $cat_name , 'event-categories'); $cat_id=$cat_obj->term_id; }
But then I’m unsure on how/where to use $cat_id there. Should it be replacing ‘event_id’ here?
if( !empty($_REQUEST['event_id']) ){ $EM_Events = array(new EM_Event($_REQUEST['event_id'])); }else{ $EM_Events = EM_Events::get(apply_filters('em_calendar_template_args',array('limit'=>get_option('dbem_ical_limit'), 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') )) ); }
or should ‘category’=>$cat_id go in as part of the ‘get(apply_filters(‘ array? And is it safe to assume that this won’t replace the default, root .ics functionality, right?
Thanks for spelling it out a little more!
Thanks for the quick reply! Unfortunately, this didn’t seem to do it. I tried inserting those lines completely before my code:
<?php remove_filter('the_content', array('EM_Event_Post','the_content')); ?> <?php $first_recent_article = new WP_Query(array('category_name' => 'articles', 'posts_per_page' => '1'));... ...<?php the_excerpt(); ?> <? add_filter('the_content', array('EM_Event_Post','the_content')); ?>
then right before my query and after the_excerpt();:
<?php remove_filter('the_content', array('EM_Event_Post','the_content')); $first_recent_article = new WP_Query(array('category_name' => 'articles', 'posts_per_page' => '1'));... ...<?php the_excerpt(); add_filter('the_content', array('EM_Event_Post','the_content')); ?>
and then once on either side of the_excerpt():
<?php remove_filter('the_content', array('EM_Event_Post','the_content')); the_excerpt(); add_filter('the_content', array('EM_Event_Post','the_content')); ?>
None of these variations seemed to change anything. Should I be doing this through a custom function in functions.php, or should they be ok in the sidebar query itself?
Thanks for your help,
Z-247
Forum: Plugins
In reply to: [Post Thumbnail Editor] Post Thumbnail Editor not working in 3.3Sure thing:
20120103 21:29:17 - [string] ===== STARTUP PHP MESSAGES ===== 20120103 21:29:17 - [string] ===== SERVER LOG ===== 20120103 21:29:17 - [string] [DEBUG] - PARAMETERS: Array ( [action] => pte_ajax [pte-action] => launch [id] => 397 ) 20120103 21:29:17 - [string] [WARNING] - Couldn't find or generate metadata for image: 397-large 20120103 21:29:17 - [string] [DEBUG] - USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 20120103 21:29:17 - [string] [DEBUG] - WORDPRESS: 3.3 20120103 21:29:17 - [string] [DEBUG] - SIZER: 1.00000000 20120103 21:29:17 - [string] [DEBUG] - META: Array ( [width] => 210 [height] => 310 [hwstring_small] => height='96' width='65' [file] => 2012/01/pillow-bronze-rayon-pair.jpg [sizes] => Array ( [thumbnail] => Array ( [file] => pillow-bronze-rayon-pair-e1325624339899-75x56.jpg [width] => 75 [height] => 56 ) [medium] => Array ( [file] => pillow-bronze-rayon-pair-203x300.jpg [width] => 203 [height] => 300 ) [post-thumbnail] => Array ( [file] => pillow-bronze-rayon-pair-75x56.jpg [width] => 75 [height] => 56 ) ) [image_meta] => Array ( [aperture] => 0 [credit] => [camera] => [caption] => [created_timestamp] => 0 [copyright] => [focal_length] => 0 [iso] => 0 [shutter_speed] => 0 [title] => ) ) 20120103 21:29:18 - [string] ===== REFLOW ===== 20120103 21:29:18 - [string] ===== FIXING THICKBOX ===== 20120103 21:29:18 - [string] WINDOW WIDTH: 779 20120103 21:29:22 - [string] ===== SETTING ASPECTRATIO: 75:56 ===== 20120103 21:29:24 - [string] ===== SETTING ASPECTRATIO: 75:56 =====
Thanks!