I'm trying to develop a wordpress plugin but have become unstuck very quickly.
The plugin within the admin is to act as a way for users to set up various database fields so that the front end of the wordpress site can then use these. This is going to happen over several pages, one for each task.
I'd want to be able to load these pages in from links on a main page.
This I can do but these pages do not load into the wordpress admin site they just load on there own.
How can I load these pages in (using hook calls?) to the wordpress admin site, right of the menu?
I have got my plugin to appear in the menu with add_object_page and have called that using add_action. I have a page loading up fine but cannot link to any other pages.
Ok, I was very tired yesterday and failed to try using the slug.
The slug you give to menu items to fire off a function can be used again on other links. The slug will do the same as it does on the menu items!
Related
I have a wordpress affiliate website. I need a build a middle page for all my external links. I'm using 'redirection' plugin for the redirections. To better understanding, in a new tab that page must be show up for 2 seconds then the external link will open.
Page>Redirection page(2 sec)>external page
I tried to handle it with plugins but js is what i need it
according to your case, In my opinion, the fastest way to achieve this goal is to use a plugin.
Using the Mihdan plugin: No External Links
To redirect to a specific page in WordPress or similar plugins.
https://wordpress.org/plugins/mihdan-no-external-links/
I am having a weird issue I can't figure out. I am creating a SaaS App for a client using WP as the framework. I am creating shortcodes to place the content/code on each of the pages. The FrontEnd Dev is having an issue when they select a page to edit the Additional CSS in Customizing, as soon as they hit any key on the keyboard the page automatically redirects to the Homepage of the site. But it is not redirecting like when you click on a link, it seems like it just automatically replaces the shortcode content with the Homepage shortcode. It's really weird.
It doesn't matter what page I am on it will do it. Even pages where I don't have a shortcode on it, it's just a blank page. No errors in the console.
The actual SaaS App when not viewing it from the CMS of WordPress works just fine with no problems.
Any ideas?
UPDATE
I have been spending hours on this and I have just discovered the issue, problem now is that I have to figure out why it's doing it. Here is my update.
In my application I have some <a> (Links) that I code in using either window.location.href or window.location.replace. Using the app from the front-end there are no issues at all. BUT If you go to customize the theme from the WP Backend whenever you hit a key on the keyboard in "Additional CSS" it causes the site to go back to the previous page you were on when clicking a link that uses the redirects I mentioned. If I hardcode those links without using code then nothing happens and the pages do not redirect as intended. So the issue has something to do with using the coded redirects. I know when customizing a theme WP updates those changes live. I can see in console admin-ajax.php being called when editing the CSS. That is what I have so far.
I have a wordpress site and a theme. When I hit home page it suppose to show products available in site, but is loading theme with default products came along with theme. I want to render my own products instead of theme products when I hit home page.
I do like to use existing rest web service to load that products from DB to show in theme home page.
I am new to wordpress and I need a way to achieve that requirement.
Thanks in advance..
I'm creating a landing page in WordPress and I've got an issue.
I've got a custom post type (that's an image), that is displayed via carousel and when clicked opens another web-site in a new tab. Problem is that WordPress generates page for every new page, should it be custom post type page or just basic post page.
I'm using only my main page on web-site so I don't want user to somehow access those pages, cause they basically display nothing.
How can I disable this feature and make WordPress redirect user to main page, if he is somehow trying to access this post pages?
If you are using only main page and your post pages show nothing (I mean they generate 404 error) you can redirect visitors to home page. In this purpose you can use plugin like this one: All 404 Redirect to Homepage
We use a lot of plugins and unfortunately can't remove more of them.
Our backend is slow.
Wordpress is built to load each plugin on every page load, also in the wp-admin backend. So even if you are on pages, where no plugin would be needed, woocommerce, contact form 7 etc. will be loaded. They put their CSS in the page but also do PHP stuff and slow everything down.
We know plugin organizer - a plugin that makes it possible to selectively load certain plugins on certain pages. They have a feature to do it on the backend - but it's a already a hell to work with it on the frontend. We use plugin logic in the frontend now.
Is there already a plugin or a hand crafted solution to select which plugins should be deactivated/activated on with wp-admin pages?
I guess it's needed to load every plugin on every wp-admin page to get the admin menu (the left side menu) - so I might be needed to built this menu and cache it somehow.
And then selectively activate plugins for certain pages.
We use custom fields - so ACF plugin has to be activated on some pages - also on some woocommercer pages. Polylang (for multilang) must be activated on a lot of pages.
But for example woocommerce doesn't need to be loaded on the event calendar pages and vis versa.
Do you know of existing solutions to lower the time needed to build the backend.
Are there any caching options?
You cannot activate/deactivate plugins individually for particular pages. Each plugin is either active or not when your site loads.
Here's something to try: In your staging environment, deactivate all of the plugins to see if that solves your problem with the slow admin menu. If it does, reactivate each plugin one by one until you find the problematic plugin. Then troubleshoot from there to determine the root of the issue.
You could also check your server's error logs to see if there are any warnings indicating issues with the site.
If that doesn't help, one final piece of advice I would offer is to contact your hosting company directly to inquire about any potential server issues that are slowing down your site's performance.