mighty_mt
Forum Replies Created
-
Forum: Plugins
In reply to: [WP REST Cache] Question about custom endpointsI just updated to version 2019.4.1 and the caching works as expected. Thank you.
Forum: Plugins
In reply to: [WP REST Cache] Question about custom endpointsThanks for you time and effort.
I just took about an hour to debug this and found the problem.
The
skip_caching
method inEndpoint_Api
always returned TRUE for me which is apparently due to some kind of feature/bug when a server uses FastCGI (which is the case on my shared hosting account):filter_input() doesn’t work with INPUT_SERVER or INPUT_ENV when you use FASTCGI
Source: https://stackoverflow.com/a/36205923
As soon as I replaced both calls of
filter_input
inclass-endpoint-api.php
with direct access to the appropriate keys in the $_SERVER array it all started to work.I don’t know if this an ideal solution, maybe you can work out an official fix.
Forum: Plugins
In reply to: [WP REST Cache] Question about custom endpointsHi,
I just double-checked but that file was already in the correct location and also shows up in the WordPress admin under “Plugins” -> “Must-Use”.
Forum: Plugins
In reply to: [WP REST Cache] Question about custom endpointsHello and thanks for your reply.
I did a little more testing and found that “WP REST Cache” works correctly on my local machine (XAMPP on Windows 10, PHP 7.2.4, MariaDB 10.1.31.0). The data from my dummy plugin shows up in “Endpoint API caches” with Object Type “unknown”.
However on my shared hosting account (cPanel, PHP 7.3.6, MySQL 5.6.44), nothing ever shows up in “Endpoint API caches” and also the
wp_rest_cache/determine_object_type
filter never gets called.
This occurs even on a clean install and with core endpoints likewp/v2/posts
(data fromwp/v2/posts
does however show up in “Item API caches”).Do you have any idea what might cause this behaviour?
Forum: Themes and Templates
In reply to: [Ryu] Author Slug = UsernameThis is not a “problem” of the Ryu theme but of WordPress itself.
I think there are two ways to achieve what you are looking for:
- Use default permalinks
- Use one of several plugins that can modify the author slug. Just search for “author permalink” or “author slug” in the plugin repository. I haven’t actually tried any of those plugins myself but I think this would be the best way to go.
Forum: Plugins
In reply to: [MP6] Is that Comic Sans in the banner image?Yes, and also the Fauxgo. As well as my old HP laptop from 10 years ago ??
I think the solution suggested by Jeremy Herve above is fine if one wants to rewrite all the carousel CSS from sratch.
However I only wanted to change the fonts to better integrate the carousel with my theme.
So in order to keep it easy to maintain I put a ‘jetpack-carousel.css’-file in my theme folder that only contains the few modifications I wanted to make. Then I put the following code in my theme’s functions.php, so this CSS file is loaded in addition (after) the default one.function enqueue_carousel_style() { wp_enqueue_style( 'my-custom-jetpack-carousel', get_stylesheet_directory_uri() . '/jetpack-carousel.css', array( 'jetpack-carousel' ), wp_get_theme()->Version ); } add_filter( 'post_gallery', 'enqueue_carousel_style', 1001, 2 );
I’m noticing this problem as well and just created a Trac ticket for it: https://plugins.trac.www.ads-software.com/ticket/1599
Forum: Themes and Templates
In reply to: [Hum] [Plugin: Hum] Great start but…some problemsIn the Hum theme the main sidebar is not displayed. What you should be able to do though is to use any of the “Footer” sidebars. Widgets you put in there will show up at the bottom, below your posts.
@natebot: Thanks for updating this useful plugin.
Actually I also don’t know how you would submit your patch, but hopefully you can somehow manage to do so.By the way the “Log Deprecated Notices” plugin finds a few deprecated WordPress function calls in Members Only 0.6.7 (see Screenshot the following screenshot): membersonly.jpg
Forum: Fixing WordPress
In reply to: Custom taxonomy query that excludes children postsI’m just writing this to confirm @jeremyclarke’s solution. Looks like the ‘include_children’ parameter actually works. Thanks for mentioning it!
Forum: Hacks
In reply to: get_posts won't filter by post_typeI was just having the same problem with the get_posts function. What I ended up doing is using WP_Query instead, which does exactly what get_posts should be doing as well.
Here is a simplified version of my code:
//Setting up the query arguments $myArgs = array( 'numberposts' => -1, 'post_type' => 'my_post_type', 'orderby' => 'title', 'order' => 'ASC' ); //The following line doesen't work //$myPages = get_posts( $myArgs ); //This does the job $myQuery = new WP_Query( $myArgs ); //Looping through the posts while ( $myQuery->have_posts() ) : $myQuery->the_post(); echo '<a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a><br />'; endwhile; // Reset Post Data wp_reset_postdata();
Forum: Plugins
In reply to: [Simple Facebook Connect] Simple Facebook ConnectI saw this PHP error appearing on the bottom of the “New Post” page in the WP Admin after upgraded to 3.1. Also the rich editor didn’t work after the upgrade.
This behavior only occurred on one of my WP installations and deactivating all plugins also didn’t change a thing.The culprit in my case was the “Rask” theme (https://bizzartic.com/bizzthemes/rask/). After switching themes (to Twentyten) everything works fine again now.
By the way I’m using PHP Version 5.1.4 without mbstring.
Edit: My comment is pretty much unrelated to the original thread author’s as I never used the “Simple Facebook Connect” plugin.
Forum: Plugins
In reply to: post_type_link filter working but returns 404Just wanted to say that @jorgecosgayon’s comment helped me as well.
I went to the “Permalinks” Settings page and clicked “Save Changes” without changing anything and now my new custom post type seems to work perfectly.Forum: Fixing WordPress
In reply to: Dashboard CSS not loading in FirefoxWe have WordPress running on a server on the local network and I also had this problem (Dashboard CSS not loading) yesterday.
But in my case it was only happening on my computer and in FF as well as IE, so I had to track this down locally. It tured out that my anti virus program (Avira AntiVir Pro), namely its WebGuard was the reason. Disabled this and it works again…