doubleedesign
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Query loop: showing same category as current postCan you share the code your currently have in the template?
I had this issue with a calculated field. The client also had the Multi-Part Forms extension and had accidentally added a second page with a duplicate of one of the fields used for the calculation. Removing that made the calculated field work correctly and cleared this error.
I just had this issue. I found it was because under Advanced Settings > Download File, Analytics.js was selected when it should have been Gtag.js.
Thank you for the quick reply!
I had tried clearing out all of the rows in wp_options related to the plugin to get the prompt again, but the issue still happens. As it’s being used on a multisite, I also tried on a different site, no luck. I will create a support case as I have some other questions about our use case that may be able to be answered at the same time. Thank you!
Forum: Plugins
In reply to: [Bring Fraktguiden for WooCommerce] Filter Shipping MethodsHave you looked at using shipping classes?
Forum: Plugins
In reply to: [Groups] Programmatically assign read permissionsThank you for the quick reply George, and apologies that it has taken me so long to reply as I only just came back to this.
I had been trying to assign an array of IDs instead of one, which isn’t really necessary as I’m doing one group per page, I just wrongly thought that was the correct format.
I also combined this with the creation of the page, as I learnt that
wp_insert_post
returns the page ID if assigned to a variable, so the two functions (page creation and group permission assignment) do not need to be separate.(I also believe that way is better as combining both steps into the one function removes the risk of the page ID being incorrect – as it’s been created immediately before the permission assignment with no opportunity for another function or user action to interfere.)
Here is the updated, working code – in terms of the specific problem this post was about, I just removed the step to create an array containing
$group_id
and popped that variable straight into theupdate_post_meta
call./** * When a new group is created, create their page * and assign read capabilities * @param $group_id */ function doublee_create_group_page($group_id) { // Get the group name $group_name = doublee_get_group_name($group_id); // Set up the page $post_data = array( 'post_title' => $group_name, 'post_type' => 'page', 'post_status' => 'publish', 'post_name' => doublee_build_title_slug($group_name), ); // Create the page and return its ID as $page_id $page_id = wp_insert_post($post_data, true); // Update the post meta with the read capability for the group update_post_meta($page_id, 'groups-read', $group_id); } add_action('groups_created_group', 'doublee_create_group_page', 5);
- This reply was modified 5 years ago by doubleedesign.
- This reply was modified 5 years ago by doubleedesign.
- This reply was modified 5 years ago by doubleedesign. Reason: Clarity
Forum: Everything else WordPress
In reply to: Re-opening own thread to post solutionNope. We canβt reopen topics closed due to age. You may want to write a blog post about your problem and journey to the solution.
That’s a shame. Yeah I plan to post the solution in more detail elsewhere but my old thread was the first result in Google when searching again so I thought it might be helpful, if possible. Thanks for the quick answer though Steven!
Forum: Plugins
In reply to: [Mailgun for WordPress] Can not disable “Mailgun is almost ready”If you update to 1.7, there’s no longer a settings page for multisite, you need to put the creds into wp-config – but the warning goes away!
Example:
// Mailgun define('MAILGUN_REGION', 'us'); define('MAILGUN_USEAPI', true); define('MAILGUN_APIKEY', 'YOUR_KEY'); define('MAILGUN_DOMAIN', 'yourdomain.com'); define('MAILGUN_FROM_NAME', 'Your site name'); define('MAILGUN_FROM_ADDRESS', 'no-reply@yourdomain.com'); define('MAILGUN_SECURE', '1'); define('MAILGUN_SECTYPE', 'ssl');
Forum: Plugins
In reply to: [Mailgun for WordPress] Mailgun selection not in settingsYeah, the settings page has been removed as of version 1.7 of the plugin.
Forum: Plugins
In reply to: [Yoast SEO] WooCommerce shop page title not able to be changedThank you! The custom title / variables don’t work for me for this, so I’ll look forward to the 9.2 release with it fixed π
Forum: Plugins
In reply to: [WooCommerce] Programmatically adding a class to productsActually it’s only half resolved my issue,
wc_product_post_class
applies the custom class on the single product template, but not in the loop. I’m still looking for advice on the latter.- This reply was modified 5 years, 8 months ago by doubleedesign.
Forum: Plugins
In reply to: [WooCommerce] Programmatically adding a class to productsThat’s not the one as I’m trying to add to individual products, however the one directly below that is
wc_product_post_class
which is a step closer. I worked out thatwc_product_post_class
passes classes topost_class
, which works for adding my classes to single product templates, but not in the shop loop (which is strange because all the classes are otherwise the same in both contexts).Forum: Requests and Feedback
In reply to: oEmbed privacyWhy is there still no UI for fonts in WordPress?
Typography is the responsibility of the theme, not of WordPress core. It is a design decision. Giving users too much freedom with things like fonts just creates a messy and slow site (e.g. imagine if they decided it would be fun to use seven fonts in one blog post).
Forum: Requests and Feedback
In reply to: WordPress implementation in a frameworkTry Drupal, it has much more of a framework-like nature to it, and good support and a wide userbase as well.
Coincidentally, Drupal 8 is built on Symfony π
Forum: Fixing WordPress
In reply to: Editor Can’t Access DashboardHave you added a plugin or custom code that modifies user roles and/or capabilities? If so, which plugin or what is the code?
- This reply was modified 5 years, 11 months ago by doubleedesign.