I am working on news system not integrated with opencart admin panel (I dont need this), but I want to display data on my custom opencart page, which is using template.
I made php script which display my news from other database, but I have not idea where to put this.
In few word - I want to execute my own script only on one opencart page (for example in custom page created in information).
I found solution at opencart forum :) - http://forum.opencart.com/viewtopic.php?f=23&t=136937
Related
I'm a beginner who learns about WooCommerce and right now I have a project where I need to make from an HTML Website to a WordPress Theme where you can put a product and list on the page.
Can someone give me an article or share some information with me? Here is a photo of how I want to make it.
https://imgur.com/a/JDeoZD1 The line is facing the location for products but I don't know how to make a PHP and integrate to all products insert in this space with my .css. Thanks.
you have to use woocommerce such a rest api in your app check the link : https://woocommerce.github.io/woocommerce-rest-api-docs/
this article show you how to link your woocommerce store with php : https://iconicwp.com/blog/woocommerce-api-php/
I have found multiple postings with similar phrases but all too specific to their issue and not addressing this...
Most of the website requires a login session. I have built a custom plugin for WordPress to handle my CMS needs, etc. I have included a blog in the website. However, my issue is... How do I require login when "blog" is selected on the menu. AND I do NOT want to show WordPress anything. I want the blog to look like the rest of the site.
Basically I want to "nest" the blog in my website with one required login session. I have the menu item "blog" set as a category so as to pull the WordPress pre-built functionality. So this is the only item I am not able to php a login session as there really isn't a page to do so.
I have read several things. But finding them a bit confusing. Many say to change the wp-config.php but I am not comfortable with changing core files within WordPress. What am I missing or misunderstanding?
UPDATE:
Would changing the menu selection to a "page" instead of "category" and insert php file within that page with a redirect using header('Location:mysite.com/blog_files (of course after session verified) to redirect where WordPress has stored my blog? Is this a viable work-a-round?
You can use your wordpress as API point. Wordpress comes with REST API. So what you can do is get all posts after certain action. Then parse them in html.
There are 2 things to keep on mind.
1st is that everything on wordpress is post.
2nd is that to change certain parts of how api works you add filters to functions.php.
Hope I was helpful.
UPDATE
I have successfully "nested" my blog into my website so that login session is required. Changing the menu selection to a "page" instead of "category" and insert php file within that page with a redirect using header('Location:mysite.com/blog_files (of course after session verified) to redirect where WordPress has stored my blog files. This was quick and easy. However, it still requires WP login to participate in the blog. :(
The situation
A customer has a website made in WordPress for selling houses. When designing the website they made a 'te-koop' (for-sale) post type with dummy items for testing.
So now in the sidebar (backend) I see this:
Post type in sidemenu in backoffice
On the front the main page uses /themes/THEMENAME/archive-te-koop.php
and the detail pages are using /themes/THEMENAME/single-te-koop.php
This all worked fine and I understand how this works.
But now I have to implement data from an API that contains all different houses etc. I can use a custom plugin that generates the shortcodes I need. I have already installed and activated it and used the shortcodes on the homepage.
So then I started editing the archive-te-koop.php file and used do_shortcode() to call the overview of all houses, which works perfectly. And I can surf to using the link: https://DOMAINNAME/te-koop
The problem
I now want to edit the single-te-koop.php page for the details of the houses. The problem is that I can only go the detailpages of the dummy items because of the %post-name% being used. (https://DOMAIN/te-koop/%post-name%)
How can I make this work so I can remove the dummy items and then call the API shortcodes in the single-te-koop.php file?
I think the problem is the is_singular() function which results in false if there is not an item in de backoffice.
I really hope someone can help me on my way
I need to add few additional pages to my wordpress site.
These pages should not be "part of the site", ie they should not be linked somewhere from the posts and so on.
However, they should have the same header/footer as the rest of the site ( I am using custom theme ). And they should be accessible via url.
The final requirement is, I should be able to code in php.
At the moment, I tried to create a new "Page" in my admin console. And then write some php-code inside. However, all my php code gets commented and since not executed.
I don't think that installing plugins such as Exec-PHP is a good idea, so I am trying to find other solutions.
Any comments/advice/suggestions how to make it?
I would be grateful if you give me some how-to link.
Thank you in advance.
You can use a custom page template in your theme for this and just keep the site empty in the admin panel:
http://codex.wordpress.org/Theme_Development#Custom_Page_Templates
By using Template tag's you can create custom page.
write this code on the top of your php file....
/*
Template Name: Your Template Name
*/
I am using Carrington Build theme and I've created a custom module.
Now, I need to check in which pages these modules are being using and generate a list somewhere else.
To achieve this I am trying to get the current page in which the module has been added from the admin side page. but everytime I open the module admin panel in the page it never returns the existing page with the following wp commands.
I was wondering if anyone could tell me how to get the current page from the admin side?
I've tried get_the_ID(), wp_title(), single_post_title()