create CMS for wordpress theme - php

I have converted HTML site to WordPress theme and uploaded it to the server, now i want to create CMS for this theme , but there are another active theme now and those are the the current pages.
how can I create a new page for my new converted theme without losing or effecting the current themes and the contents?
this the themes the active theme and my new covered theme

From what you describe I would advise you to create a Child Theme: https://developer.wordpress.org/themes/advanced-topics/child-themes/
Then you will be able to overrides only the templates you want if you conform to WordPress' Template Hierarchy: https://developer.wordpress.org/themes/basics/template-hierarchy/

Related

WordPress - using Ultimate Member plugin in your custom theme

I'm trying to use Ultimate Member plugin in my custom theme which I created from scratch. Well actually I downloaded this theme (freelancer) from startbootstrap.com and used it as a basis. I activated the UM plugin and added the default pages, but I'm not able to view those pages in my custom theme. Do you need to add any pages or functions in order to activate the UM plugin in a custom theme?
The plugin does work on default themes like twentynineteen. So I believe I should be missing something in my custom theme.
Here is the directory structure of my theme:
wordpress
wp-content
plugins
ultimate-member
themes
mytheme
assets //copied from bootstrap theme
author.php
css
style.css
footer.php
functions.php
header.php
index.php
js //copied from bootstrap theme
page-authors.php
page-{category-posts).php
single-post.php
style.css
ultimate-member
login-to-view
...
(and other files based on the article below)
I referred to this official article for template structure under /themes/mytheme/ultimate-member/ :
https://docs.ultimatemember.com/article/1516-templates-map
I was able to move forward when I added a singular.php file. I made additional changes on top of that but this file seemed to be the file I was missing.

Add a custom-made slideshow to Wordpress Theme

So i made a slideshow using HTML, CSS and JS.
It's for a personal blog i'm creating, so i would like to add the slideshow into a Wordpress theme that i purchased.
I created a child theme and tried to edit the function.php file and the style.css, and although i know some PHP it's really hard to understand how the code works and where to add mine.
Basically i want to display my slideshow initially, and then the rest of the Wordpress theme with all the posts and such.
Is it possible or should i only work with the customization options of the theme, although they're limited?
Since you've gone with a child theme, may I suggest copying a page template from the parent into your child theme?
Then you can copy your code for the slideshow via the editor into your child theme's copy of page template and use said template throughout your website for whatever page you'd like without colliding with parent theme updates.
Here's a relatively simple tutorial for creating a page template:
https://www.cssigniter.com/add-custom-page-template-using-child-theme/

Using files in a child theme

I have a WordPress site in which I am using a theme called OneEngine which uses the Aqua Layout builder. This comes with a variety of pre-made layout blocks.
The only issue I have is that by default each element is col-md-12 which doesn't give me much in the way of fine control.
So I thought I'd create some new blocks for col-md-6, col-md-3 etc
I created a child theme with the usual things
style.css
functions.php
The Layout builder plugin is in this location:
/wp-content/themes/oneengine/plugins/pagebuilder
My child theme:
/wp-content/themes/oneengine-child/plugins/pagebuilder
So, in my child theme I made a copy of the plugins folder to make my changes, however the site does not acknowledge the changes in my child theme like it does with CSS
Essentially I want my site to use the plugins within the child theme.

Overriding specific third party Woocommerce plugin templates

I'm using a Woocommerce based plugin called Mix 'n Match Products.
This plugin sits inside /plugins/woocommerce-mix-and-match-products/
This folder contains another folder for templates.
Following convention, I have copied the "templates" folder into my child theme and changed the folder name to "woocommerce-mix-and-match-products"
The structure is now themes/storevilla-child/woocommerce-mix-and-match-products/
However, none of the templates override the plugin templates. I have tested. Only once I change the actual plugin template files, does the HTML change.
Can anybody spot what I may be doing wrong?
Thanks
The way to do it is a little bit different. All WooThemes woocommerce plugins use the default woocommerce templates folder described in this documentation:
2 cases:
You have already a woocommerce folder in your active child theme (or theme).
Copy from plugins/woocommerce-mix-and-match-products/templates/single-product/mnm/
to themes/your_active_theme/woocommerce/single-product/
And plugins/woocommerce-mix-and-match-products/templates/single-product/add-to-cart/mnm.php
inside themes/your_active_theme/woocommerce/single-product/add-to-cart/
You don't have any woocommerce folder in your active child theme (or theme).
Copy from plugins/woocommerce-mix-and-match-products/templates/
inside your active child theme (or theme) and rename it woocommerce.
So in your case you will have: themes/storevilla-child/woocommerce/
Reference: WooCommerce Template Structure + Overriding Templates via a Theme

Extending Theme Options to Child Themes in Wordpress

I have purchased the Honest theme. I have also created a child theme for some look/feel changes. In my child theme I have also created an additional custom post-type.
For some reason the Honest theme options are not available in my child theme dashboard. Since I have a custom post-type I don't want to simply use the parent theme because any updates will overwrite my custom post-type.
Is there a way to make the parent theme options available in a child theme? If so, can you point me toward a direction of that solution?
Hard to say without seeing the actual source code.
If you're willing to use the parent theme, you can put the code that registers the custom post type in a plugin of your own. Must-use plugins are great for this: http://codex.wordpress.org/Must_Use_Plugins
You can also put your style mods there, e.g. enqueue an extra stylesheet that overrides the styles from the parent theme: http://codex.wordpress.org/Function_Reference/wp_enqueue_style

Categories