How can I add custom content to products page in php?

Hi I hope php experts will help

I have php website which is based on directory ad listing

I have single products.php page it is used to display listing ads in the frontend of the website

Like when customer selects their category and subcategory and location the ads will automatically added to the particular category and subcategory page and it showed in the front end of the website

My problem is I need to add a custom content like headings and paragraph according to the adds shown the page

For example if I have listing page Which has category as "software " and subcategory as “php development” in the particular page I need to show the custom content on php and web development for seo rankings

But there are no separate pages the data is dynamically shown from the database I have only products.php page

Welcome to the site, Venkatesh !

Well, if you have a database of products which includes a category and subcategory and location, you could just add two more fields to it to include the heading and paragraph. Then, when you list the ad that is selected by the category and subcategory or location, you would already have the data when you run the query against the database. Then, use them for the display.

I am not clear on what you need. But, normally, you have an ADMIN page where you create the ads. In that area, you enter the category and subcategory, product name, product ID and other things. You could add the headings and paragraph in that section and create them when the ad is created. Then, it would be available for display.

Not sure I helped. But, it sounds more like a database design issue than a PHP code issue.

Sponsor our Newsletter | Privacy Policy | Terms of Service