I'm having some trouble trying to figure out how to make a custom URL in the admin area for my plugin. I already know how to use the add_menu function, but I need to create a sub-page for the plugin which wont be listed in a menu. I can't figure out how to define a URL for this page though.
Basically I just need it to do if they view "admin.php?page=my_page" then use the function I have made which simply does an include on the .php file for the page.
you can just use the ?page=my_page
if you want to add more to the url then use
?page=my_page&page-id
you will directory able to access this in admin area no need to use extra like bloginfo something for whole url
hope this will help you
Related
I have a page in which I want to display dynamic content.
Currently it works like:
site.com/c-page.php?brand=hp
How can I call it like:
site.com/brand/hp
Is it necessary to write a rule on htaccess?
Thanks.
If you're using Wordpress, You may select the Post name structure for the following structure. This will automatically change in your .htaccess file
Hope this will helps you.
For more information,
change WordPress permalink structure
I have been trying to figure this out now for a while but there but I haven't found any conclusive answer yet. I want to add some pages to wordpress that are static. I need to include JS script that is from a third-party login. Using JS, HTML, CSS. Very simple and basis login.
So normally what I do is create a page, empty, attach a template and put the JS/HTML/CSS/Text into that template.
However, it seems weird to create an empty page in a CMS. Is there another way, a proper way, of adding a normal page into wordpress without using the static PAGES option in the CMS?
You could just create the page and add a link to it from your WP-site. But this is only if you don't need any of the wp-functions. Also it won't show up at all in your wp-admin dashboard.
i'm wondering if it's possible to add a php file in your themes folder (wp-content/themes/classic) where the css file is, then link afterwards? Because i'm currently trying to add a register.php into my blog but i still need the header and everything else.
Yes. For example, if you want something like www.yourdomain.com/test follow this steps:
In your theme folder create a php file called page-test.php.
From your dashboard publish a page with the title Test(with no content at all).
Now, when you'll go to www.yourdomain.com/test you will se your page. And in page-test.php you can use all Wordpress functions such as get_header(), get_sidebar() etc.
Yes. What you want is to define a new "page" template, and then to create a new page in your wordpress using that template. Here's the WP documentation on that topic: http://codex.wordpress.org/Pages#Page_Templates
Alternatively, you don't have to place it in your theme folder; you can put it in the root wordpress folder and have it function outside of wordpress. Then you can change your theme to have a static link to that page, or link to it in some other manner. It would be more difficult to use the header/footer/sidebar template features, though.
I'm developing a WordPress theme and I need to have a custom URL for some kind of content.
For example, I need to have a page to show some article details. Now, i've created a page template called "Article", and so i've to create a new page and give it the page template "Article"
(I get the url http://mydomain.com/article?id=123)
It works fine, but now i'm having dozens of this pages, and it's a mess to create them all on every installation of this theme, so i want to do it in my theme code.
I saw something near that on BuddyPress, where you can use /member/ and it redirects to a member page. I just wanna know how to do so.
Thanks!
If you are running wordpress 3.0 I would recommend making a custom post type for your articles. That would allow you to control the URL in the way that you want and also allow you to use more sophisticated full text urls if you wanted to.
Here are some links to some tutorials about how to make a custom post type to get you started:
http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0
http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/
The second one has an example file that you can download and edit to help you get started.
Cheers,
Paul
When I have a custom node type and I want to create a page, can the link be something other than what Drupal automatically assigns?
i.e. Currently to add a node-type it is: www.example.com/node/add/node-type
but can it be customized to just www.example.com/node-type ?
You can use the path module, which is a part of Drupal core, to create a path alias. This will change the appearance of the url in the browser, but internally it will stay the same. You can find the settings at admin/build/path