Using Wordpress Navigation Menu on non-Wordpress Web App - php

I need to use the main navigation menu from a wordpress page on a non-wordpress page so that the menu can update on the non-wordpress page dynamically.
I want to be able to update the menu on the wordpress backend, and have it automatically update on the non-wordpress page.
What would be a good approach for accomplishing this?
Thanks!

It's possible to include WordPress on a page without using a WordPress theme. Add this to the top of your file (and make sure the path to wp-load.php is correct):
<?php
define('WP_USE_THEMES', false);
require('wordpress/wp-load.php');
?>
I've done this before when I want to tap into useful WordPress stuff (like a contact form plugin) on a page that isn't on the WordPress part of my website.

Related

Adding wordpress menu items or wordpress plugins to a side page that is not wordpress

I currently have a Wordpress website and have a page in the site that is not Wordpress. I have an admin menu on this page that connects back to mysql and I have a plugin installed on Wordpress that I would like to be accessed inside of this non wordpress page. They both use the same sql database. The page that is not a wordpress page is html, php. I am just wondering how I can do this. Thank you.

Change links in wordpress template without creating a table in database

I have a wordpress template which have some static content.
in fact the index page has a page template and its all static and have no control from wordpress.but using header and footer.
I want to change static links in this page using admin panel.
How to change this static links from wordpress panel without using a database to store this links?
thank you
You need to edit theme's files. Use Wordpress editor for this.
UPDATE
Install the plugin for managing options. For example, WP Options Editor
In your template replace the code that should be customizable with the
get_option('your_option_name');

wordpress plugin development issue : Generate php pages

Does anybody know how to generate pages in wordpress, with php code as a content using a plugin?
For example the; the plugin will create landing pages, without the use of wordpress pages or custom posts. Just in the backend settings, it can add/modify/delete pages.
Thanks,

Link to custom php theme page in wordpress

I want to link a template php page (header.php) to a custom php page (cmenu.php) I made in the same theme.
I've searched on a lot of websites via google and also through the Wordpress Codex on how to accomplish this but I can't seem to find it.
In my header.php page I have a div which I want to have an url href link to my custom menu called cmenu.php. (I want to link it to that page to be more mobile friendly.)
I tried te following codes I found in the codex and google but none of them work:
get_cmenu()
get_template_part('cmenu')
Make the page you want to link to a template page and make a page and assign that template to it.
In a template page you can run all custom code you want.

wordpress use in own template

I've created an HTML page as part of my website which I would like to use as a template for news articles. The page has all the things it needs, it just needs to display the correct news article in it.
I installed WordPress on my webserver and now wonder how I can have wordpress publish articles using my HTML page?
Is this even possible since WordPress works with php?
thanks
What you are talking about is themes. Wordpress allows you to create a theme for your installation so it displays using your html/css (more or less)
The way I do this is copy the default theme and make changes in there, and then you can switch to your new theme in your settings.
Edit: in addition, you can also load up wordpress on any page using:
include( '/path_to/wordpress_install/wp-load.php' );
This will allow you to use wordpress functionality on any page of your site.
just edited the single.php file by pasting the desired html code and leaving the loop code there where the text needed to show up.
didn't need to break up the page in a header, body and footer. Left out sidebar for now, but will put it back after I edit it properly.

Categories