sasherwood93
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: $.ajax call function 400 Bad RequestHi,
I have amended the code and now the Ajax requests works but now the main plugin this is suppose to aid, image store returns error 500 upon publishing a new gallery and returns the URL to posts.php.
I have disable my custom plugin which returns the publishing to normal.
Any ideas if this could be related to my Ajax script and function at all.
Forum: Developing with WordPress
In reply to: $.ajax call function 400 Bad RequestThanks @joyously for your response.
I have amended my ‘action’ section but instead of error 400, I’m now getting Error 500.
Stephen
Forum: Plugins
In reply to: [Custom Plugin] Add, update, delete database dataLet me improve upon this.
I would like to use a custom page similar to the edit-tags.php but the part where you update a category. I want the update button to be able redirect to the main plugin page or referred page which would be “admin.php?page=plugin” but only if the url has a “&update-settings=1” to the end of it.
If I am adding a new category I want the same page as described but it will have a url string of “&new-cateogry=1” and then it redirects to a page with adds custom posts which I would like to have a custom page for as well.
Please note I don’t want to use the default WordPress pages just custom pages using custom url’s such as the layerslider plugin and RevSlider plugins do.
Example:
admin.php?page=myfirstplugin admin.php?page=myfirstplugin&action=edit&cat_id=1 admin.php?page=myfirstplugin&action=edit&cat_id=1&post_id=4
Thanks
Forum: Plugins
In reply to: [CoursePress Learning Management System] [Theme] Coursepress shortcodesHi Tyler,
Thanks for your response.
This does help thank you. I know the cp_pages shortcode is used in relation to the virtual student dashboard etc. Would I be able to use the custom cp_pages shortcode to display a custom virtual dashboard instead of your own dashboard, just so I can use a custom layout.
Many Thanks,
StephenHi Vinod,
I have been going through the pages on my wordpress site and the overview page is an issue of mine, I had not implemented the shortcodes correctly. But thank you anyway.
My main issue now is the integration of the remaining pages such as:
- Student Dashboard
- Student Login
- Student Settings
- Student Signup
- All the ‘single-{page}’ pages
- All the ‘archive-{page}’ pages
- Basically all the templates which make up the frontend I am having issues with integrating.
The only one I have got to work so far is the courses archive.
demo: ssherwood.co.uk/courses/
The demo is located on my personal site for client protection.
I know that there is a way of using modified/newly created templates using the structure I have imposed but some of the methods listed on the web dont seem to work.
I have been trying the
get_template_part( 'coursepress-config/templates/content', 'courses' );
but it just uses the default coursepress templates.
Regards
StephenThank you Vinod,
I do have some more questions which would help me if you can spare a minute.
I have template_include the archive-courses.php but I have an issue including or get_template_part the templates included such as content-courses.php etc.
get_template_part( 'content', get_post_format() );
Also I have an issue with the courses-overview the page only shows the shortcodes not the elements the shortcodes are suppose to display.
I am trying to use the templates within the coursepress-config/templates directory, as the theme I’m now using has a framework and I am having to include code to use the frameworks and its base css.
I would also like to do something with the course units, discussions etc when accessing via My Courses Dashboard.
Regards,
StephenHi Vinod,
Thank you very much for your reply.
Would I be able to use that function on the single pages like single course etc.
I hope you have had a fantastic Xmas or seasonal holiday.
Stephen
Hi Vinod,
Thanks for your response.
Other than placing the coursepress templates into the main theme directory, is it possible to place them in a sub directory and reference them in the functions file.
I am one for tidy directories.
Regards
StephenForum: Themes and Templates
In reply to: Login to site via url instead of username or emailThe code I’m attempting to use is as follows:
add_action( 'wp_authenticate', 'user_url_login' ); function user_url_login( $user, &$username, &$password ) { $user = get_user_by ('email', $username ); if( !empty( $user->user_url ) ) { $username = $user->user_url; } }
also want it so user dont have to type https://(www.remarpro.com) just (www.remarpro.com)
Forum: Themes and Templates
In reply to: Login to site via url instead of username or emailHi,
It’s not ajax unfortunately. It’s a function based in the theme’s functions to authenticate the user’s login details i.e $username & $password. I’m looking for the username to be equal to the user’s website url set in the user’s profile.
Example: Client Login > Domain = www.remarpro.com; Password = WordPress;
But thanks for the quick reply.