If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

WordPress. Different design for different pages

Started by -DM-, Aug 01, 2022, 02:15 AM

Previous topic - Next topic

-DM-Topic starter

Quote from: _AnnA_ on Aug 01, 2022, 10:01 AMAs soon as you show a specific page and give the image address.
First of all, thank you for your patience and participation!

I sent you the link in a private message. I don't want to publish my unfinished work for everyone. Superstitious. :)

I need the right parts (where the WP pages are):
http://go...iris.html (https://blog...s-art-iris-concept/
and
http://go...miracle.html (https://blog...miracle-concept/)

looked and worked the same as the right side
http://go. (https://blog.)

That is, the header also opened to the full page, and the menu "sticked" to the top of the screen, but the picture in the header was different.
I tried to "replace" the image at the js level hand-to-hand, but it's not so simple there - the template uses several sizes of the image on the splash screen.

I also tried using js to add the home and twentyseventeen-front-page classes to the body classes,
but the menu and title start to work crookedly, it seems that there are still some classes missing from other elements, or the main page in this Template (Twenty Seventeen) is processed by unique scripts...

Quote from: _AnnA_ on Aug 01, 2022, 10:01 AMSet the width of the left side strictly in pixels (X px), the width of the right side - (100% - X px) and specify the minimum width of 1px.

I need the user to be able to move the "red" border left and right with the mouse
plus the editor in the left frame, on smartphones automatically occupied the entire width of the screen (that is, "specify the width of the left side strictly in pixels" - does not fit conceptually)

(I tried a lot of approaches on js, but only the concept of frames works most stably, because this is processing by the browser code.
All the variants of the js code that I have tried either give the mouse off the "red line",
or at some point they "break" the layout on smartphones and tablets).
  •  


Newport

Quote from: -DM- on Aug 01, 2022, 07:48 AMI have been looking for a functionality for a very long time that can replace the concept of a frame - smoothly change the width, so that there are no jerks and the mouse cursor did not fall off the "separator" and I would be very grateful if you could tell me how to do this using modern methods.

The concept of a frame is not about changing the width, but simultaneously displaying different dоcuments (web pages, if "in a simple way") on one page. And this is evil in the modern world. Well, except for home consumption will do.

As for changing the width of mice, this is done now, and 10 years ago, using js and css (in general, it's better to immediately build the site's architecture so that you don't need to do this). There is only one problem - it needs a specialist. A specialist with knowledge of WP, not just js.
  •  

_AnnA_

Quote from: -DM- on Aug 01, 2022, 10:25 AMI need the right parts (where the WP pages are):
http://go...iris.html (https://blog...s-art-iris-concept/
and
http://go...miracle.html (https://blog...miracle-concept/)

looked and worked the same as the right side
http://go. (https://blog.)

Using the Custom body class plugin or any similar add the twentyseventeen-front-page class to the selected pages and add the rule to the additional styles
CSS Highlight Code
1
2
3
.page-id-138 #wp-custom-header img{
    content: url(https://full_path_to/images.jpg);
}
here .page-id-138 - id of the page on which you want to replace the image
repeat the required number of times.

Quote from: -DM- on Aug 01, 2022, 10:25 AMtried to "replace" the image at the js level hand-to-hand, but it's not so simple there - the template uses several sizes of the image on the splashscreen.

Why do you need WP if you crawl into the page code for every sneeze?
  •  

-DM-Topic starter

Quote from: _AnnA_ on Aug 01, 2022, 12:33 PMWhy do you need WP if you crawl into the page code for every sneeze?

Probably because I know js and don't know WP, I'm imprisoned for something else, so to speak...  ;D

THANK YOU VERY MUCH!!!!!!!!!!  :)
  •  

rebygk

One possible solution is to leverage the built-in functionality of WordPress to achieve your desired outcome. Here are some recommendations that may help you:

1. Custom Menus: Utilize custom menus feature in WordPress to create a navigation menu where each menu item represents a different section of your blog. You can assign unique header images to each menu item, making it visually distinct.

2. Custom Page Templates: Create custom page templates for each section of your blog. These templates can utilize the same header image as your main page. You can then apply these templates to the respective pages in the WordPress editor.

3. Category-based Styling: Assign categories to relevant posts within each section. Then, customize the styling of each category page to have a unique header image. This way, when users click on a specific category, they will be presented with a distinct header image and layout dedicated to that topic.

4. Widgetized Areas: Leverage widgetized areas in your theme to add dynamic content to each section's landing page. You can use plugins like "Widget Logic" to control which widgets appear on specific pages or sections.

5. Custom Post Types: Consider utilizing custom post types to create separate sections for your related topics. This will allow you to have dedicated sections with their own unique header images, while still keeping everything within the same blog. You can use plugins like "Custom Post Type UI" to create and manage custom post types easily.

6. Page Builders: Explore page builder plugins like Elementor or Beaver Builder. These plugins offer more flexibility in designing and structuring your pages. With their drag-and-drop interfaces, you can easily create unique layouts, including different header images, for each section of your blog.

7. Conditional Logic: Use plugins like "Conditional Menus" or "Conditional Widgets" to display different menus or widgets based on the page or section being viewed. This way, you can show relevant navigation or content based on the user's location within your blog.

8. Child Theme: If you're comfortable with modifying code, consider creating a child theme based on your current Twenty Seventeen theme. This way, you can make customized changes without affecting the parent theme. You can add custom templates or modify existing ones to achieve the desired layout and functionality.

Remember to always keep your WordPress installation, theme, and plugins up to date for security and performance reasons. Additionally, test any changes or new plugins thoroughly to ensure compatibility with your existing setup.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...