I recently started writing a rest api for my plugin. I need to access some custom posts however WP_Query is returning an empty array when I'm querying the db. There is the custom post type declaration. // custom post type declaration add_action('init', 'register_plugin_custom_post_type'); function register_plugin_custom_post_type() { register_post_type('my_post_type', [ 'label' => "A name", 'StackExchange exemple', 'public' => false, 'show_in_rest' => true ]); } Rest api route registration add_action('wp_rest_init', 'my_plugin_rest_init_callback'); function my_plugin_wp_rest_callback() { register_rest_route('my-rest-route', '/endpoint', [ 'method' => 'GET', 'callback' => 'rest_api_callback', …
I have a serious problem here, every time I publish and update a page/post it displays a white blank page.. here I don't know how to fix it.. is there anyone that can help me? Thanks :)
I am running a self-hosted version of WordPress on a Linode VPS running Debian 9. I was previously using WordPress on a /blog directory because I had a basic HTML site that I decided not to keep any longer, so I moved everything out of /blog and put everything back into the root directory after deleting my old site's contents. I followed the steps provided here and updated my permalink settings and used Velvet Blues to update my URLs, as …
There is a double menu that shows up on Mobile on the following website www.plotterpro.com/newsite I have been attempting to hide and it just does not want to go away.
I am updating my database using the phpMyAdmin UI and the changes are not reflected on the WordPress blog. The reason for doing this is when some changes were made recently to the blog the site hanged and was looking at reverting the code changes from the database side. When updating a blog using the WordPress admin dashboard i am able to update it. But not able to update it from the back-end database. I have disabled the plugins and …
I brewed a double batch of IPA with a buddy about 8 weeks ago. We split this into two 5 gallon pails and 2 weeks later into two carboys. His was fine, but mine developed a bit of white stuff on the top of the beer. It smelt fine and tasted OK so I bottled it after 2 more weeks. After being in the bottles about 10 days I decided to try some. I noticed that all the bottles had …
I have a Wordpress website that someone broke at some point when trying to update it. Unfortunately, I do not have a backup of the original files that the site used. What I do have is a seemingly acceptable backup of the SQL database. However, whenever I try to pair this database with some Wordpress files, I get asked to do a database update. When I do a database update, I lose parts of the website that I need. I …
For example it seems that the plain single-quote character ' (&#x27;) is converted to the right ones ’ (&#8217;) in the HTML page output. I understand the reason for this in regular Gutenberg blocks, but why does it still need to be done in the custom HTML block? I enable troubleshooting mode and use the Twenty Twenty-One theme and it's still converting. Here are the different between the input methods: <p>Paragraph block then converted to html: &#8216;</p> Custom HTML block: …
I am getting 502/ 504 errors on the website randomly, and have tried all the methods to debug the issue but unable to fix it When getting 5xx errors, I tried renaming the plugins folder to check if website is loading, and is loading. Then I tried installing each plugin one by one to find the faulty plugin but unable to find any issue as all plugins are being installed successfully but after some time it is throwing 5xx errors. …
I have an existing plugin (wptelegram) which implements in its code a call for do_action (for example, wptelegram_p2tg_after_send_post) that I would want to hook a function into. I created a basic single file plugin, installed and activated, I do see the logs for it to be activated, however, when the do_action is fired, I don't my add_action fires (no log printing so I guess it's not working) [13-Aug-2021 21:07:04 UTC] WPTELEGRAM_LOADED! [13-Aug-2021 21:07:04 UTC] myplugin activated <?php /** * Plugin …
So I'm making high ABV alcohol with just plain sugarwash, high alcohol yeast and freeze distilling. I added chitosan and kieselsol(turbo cleaner) to clear it before freeze distilling but my yeast was still live so it did nothing. I then heat up the liquid to 65 degrees to kill the yeast and maybe evaporate any weird things. Something smells and tastes really off, while before it was drinkable and actually pretty pleasant, even though it was just fermented sugar wash. …
Can someone help me to find a solution for my site. when I install a cache plugin either WP rocket or W3 Cache my site gives a download file when I try to access it and the page wont load. this all returns to normal when I disable it. I'm running this on Vultr High frq. on openlightspeed. my site is inkmattic.com This has been driving me crazy. Any help or pointing me to the right direction would be much …
I've looked around a couple other solutions, but none have worked so far (modifying .htaccess, emptying .htaccess, disabling themes,plugins). My website works fine, the index.php in the root directory works. Any other php file tries to download instead of loading. Not sure why this started happening. I haven't logged into the admin page in a few weeks, and now its not working. The server hasnt changed at all. I am using firefox, but have tried other browsers, the same issue …
I have two self-hosted WordPress servers load balanced and running the same three sites on both servers. For a while now, we have an issue where we either get unexpected CPU spikes causing one or both of the servers to lock up and freeze for a couple minutes, or a sudden drop and then spike in network traffic also causing the servers to freeze up. Every time I have tried investigating the issue, the only clue I find is calls …
I just recently shared a link to my site using he http to my site: http://thechronicalist.com but instead of redirecting, i just displays this: Warning: Cannot modify header information - headers already sent by (output started at /home/thecmltm/public_html/index.php:1) in /home/thecmltm/public_html/wp-includes/pluggable.php on line 1281 Warning: Cannot modify header information - headers already sent by (output started at /home/thecmltm/public_html/index.php:1) in /home/thecmltm/public_html/wp-includes/pluggable.php on line 1284 I have searched all over the web but they all talk about function.php or wp_configure.php but that is …
I used qTranslate in my site. Four language selections. English Russian Turkish Arabic But Arabic does not work. I tried this url: site.com/ar but it still does not work. Shows an error like the following: Warning: Cannot modify header information - headers already sent by (output started at /home/useruser/public_html/www.site.com/blog/wp-content/themes/tema/index.php:1) in /home/useruser/public_html/www.site.com/blog/wp-content/themes/tema/header.php on line 1
I would like to only dispaly the gallery & short despcription on the single product page. Using: add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); function woo_remove_product_tabs( $tabs ) { unset( $tabs['description'] ); // Remove the description tab unset( $tabs['additional_information'] ); // Remove the additional information tab return $tabs; } The tabs disappear, but the footer does not display right anymore and gets distorted. woocommerce.php: ?php get_header(); ?> <div id="page-wrapper"> <div class="container"> <section class="unique-feature-area-woo"> </section> <?php woocommerce_content(); ?> </div>
I recently took over managing this website Berman Instruments, one of our clients. They claim that it the cart was working until June. This is a 2 part problem. In this scenario, an unregistered user comes to the site, puts products in the cart, clicks on the cart then checkout, they are prompted to login or register on the My Account page. The formatting of this page is no longer correct. The second part of this problem is, once a …
A home brewing group I am with has a Grainfather Glycol Chiller. It has been working fine until yesterday. We turned it on and we had an issue. The pump is working and circulating but the chiller is not. We have checked the connections and made sure we had enough glycol, etc. Yet the chiller doesn't work. We had a batch on a couple of weeks ago and it was working fine. We thought about cleaning the connectors, which we'll …
Nobody has touched wp-admin for this site in weeks. Suddenly, URLs are being sanitized in ways that break everything. The question marks of query parameters are being replaced with URL escape code %3F, which is obviously breaking nearly every script and stylesheet include that's affected. The result is content like this: <script type='text/javascript' src='wp-content/plugins/woocommerce/assets/js/select2/select2.full.min.js%3Fver=4.0.3'></script> <script type='text/javascript' src='wp-includes/js/wp-embed.min.js%3Fver=5.4.1'></script> Some, but not all URLs in the document are affected. Scripts and some anchor elements are affected. In addition to this URL madness, …