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
Related
Im using Elementor WP for our landing pages
i got main site :
www.abcd.com
I got a landing page :
www.abcd-landing-page.com/provider=STF1
the provider STF1 is created manually .
now my mission is when user click on the main logo that redirect him back to my main site it wiil redirect him with the provider.
that in the end i will get this result
www.abcd.com/provider=STF1
I'm trying to find solution with dynamic tags but so far no succeed
any tips ?
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.
One website was already running in WordPress.
It's a static website.
Now I want to add a login page to this site.
WordPress admin panel login is different.
Now I m asking whoever has access to this site. without a login should not access this site.
I have tried with the ultimate member plugin.
create new login page also
Both cases navigation menu coming with this login page.
any suggestion to create a login page?
Use FORCE LOGIN plugin solve the issue.
Thank you all
Created two pages -> Feeds and Blog
If the user is online then
Front Page displays settings should point to A static page where Front page should be "Feeds" and Posts page should be "Blog".
When the user is offline then
Front page displays settings should point to Your latest posts, default.
For that particular users only.
You can use this function to check if user is logged in:
https://developer.wordpress.org/reference/functions/is_user_logged_in/
And this function to redirect to specific page for each user
https://developer.wordpress.org/reference/functions/wp_redirect/
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!