I have a drupal website with amp module.
How i can make to switch 2 different menu, one for AMP version and one for normal version?
I'm trying to put this expression: /*?amp but dosent work
/*?amp just give you the view of the AMP page of the current node if it exists.
I would suggest you to use AMP module. Which will also add required library and theme needed for it.
Now you can create a sub theme for AMP having AMP Theme as a base theme of it.
now just you have to create a Specific AMP menu and placed it to the region defined under your custom theme and visiting on AMP page you will able to see your AMP specific menu.
Please let me know if you need more information related to it.
Related
I'm very new to WordPress (tbh, it's my first time working with it). And I need to make a website as my school project using CMS. Creating pages with templates is alright, but I have a lot of troubles with buttons. I found this website, and I can see it using WordPress. I need such buttons as on this page https://movie-chooser.co.ua/random-movie-2/ (they appear when you hover over the image). Is this a default option for buttons in WordPress? If not, is there a plugin for this or what is the way to add them on my images?
First Install Elementor plugin https://wordpress.org/plugins/elementor/
and go to page when you add button and open page with elementor
and do drag and drop any element like button, space, text editor etc.
You have several ways to achieve that:
Overwritting Wordpress CSS
Using a plugin
Create your own shortcode
1 - Overwriting Wordpress CSS
If you manage to display all the elements using wordpress template, and your only issue is to display buttons over the images, then it should only be a matter of CSS
2 - Using a plugin
The idea here is to find a plugin that help you to create/display the informations you need (maybe you'll need to add functionnality to basic post though custom fields or using a custom post type).
Once you find the right plugin, again if the plugin dosen't directly offert some settings on the design then you'll have to overwrite the plugin's CSS rules to display the elements as you want.
3 - Create your own shortcode
If you're new to Wordpress I wouldn't recommend this method as it is kind of advanced, unless you're comfortable with PHP/HTML/CSS (optionaly JS).
This is the more flexible solution as you can basically control anything, but it will require you to understand some core concepts of Wordpress like WP Query and how custom queries works.
The idea here is to create a shortcode.
THis shortcode refere to a custom made PHP function, in which you can create a custom request to fetch the informations you need to display from Wordpress database, and display it in an HTML structure that you decide.
THen angain, you'll just have to customize it though CSS.
Note : no need to create a whole plugin if you decide to create a shortcode, you can use the template functions.php file for that.
I need to use AMP technology with specific pages in my Drupal website.
I know that I can use AMP module("AMP can be enabled for any node type. At that point, AMP content becomes available on URLs such as ?amp").
But I can't understand what i should do. Should I use two themes, first for AMP pages and second for non amp, or i need only one theme, that would work for all pages(amp and not amp)? Or I can use my non-AMP theme and just add AMP module for some nodes?
I would like to save my theme and just change some nodes to amp
There is an AMP theme that goes with the AMP module: https://www.drupal.org/project/amptheme. just install and enable (does not need to be the default theme). The AMP module does the switching for you.
Checkout:
https://www.lullabot.com/articles/how-to-try-out-amp-with-drupal
Yes, there is an Amptheme available which goes with AMP module as #stevegmag said https://www.drupal.org/project/amptheme. Also, you can create your own custom theme for AMP pages and give that the same look and feel as you have for non-amp pages.
Im quite new to drupal, At the moment ive been trying to install a commerce theme but i dont get the correct appearance of it
the original theme
how it looks in my localhost
i have alreay installed drupal commerce, panels, ctoold, views etc... can sosmebody tell me what has gone wrong and how do i get the original look of the theme
There is a lot of things you need to do after installing the theme.
After installing new theme you should do the following:
Change default logo to your site logo.
Check what menu items are displayed and manage them in your structure>>menus
Add slider images by checking where to add the images (Read your theme readme.txt)
Add content so as to display in appropriate areas.
Add Products to your site.
Configure home page link.
Configure your categories / popular categories tags blocks.
Configure special offers block. May be you need to create a view with block display.
Place search block in appropriate region.
I am listing few and you can figure out rest if anything is not at its position.
Note: Generally the theme provides you basic regions, templates, css and icons structure, and you have to manage your site content so as to get the look and feel.
I've been trying to develop my own theme and in need of some help regarding adding content to the footer.
I need to add some text to the footer which could be changed via the admin panel. I know about the Advanced Custom Fields Plugin, but I would like to learn how this can be done without using it.
I've seen theme's where the footer(or other) changes can be made via Appearance > Theme Options section in the wordpress dashboard and I too would like to do the same.
I would be grateful if anyone could provide me a link or help me start with the process of doing so.
Regards,
Vinith Almeida
You can install the OptionTree plugin for WordPress. Then you can set your theme settings via the plugin, and then when you come to the footer section, you can use the ot_get_option() function to use the user value.
You can also watch this video for more help : http://www.youtube.com/watch?v=wS0WlHITVfc or this http://www.youtube.com/watch?v=J9JQJAu0X30
You can always register your own code for an option page that can contains options for your theme, but this requires deeper knowledge of the WordPress.
I'm using Drupal for the first time and I'm hoping to move my existing website over to it. We've successfully imported our existing articles (in our own, custom format, stored in MySQL, moved over to Drupal's article system) and we're looking to get the site going. I tried installing the Colorbox module (I believe it was this one) but it doesn't seem to apply to all previous articles (the ones we imported). I've used WordPress before, and plugins (Colorbox, at least) had the ability to apply themselves to previous posts. Is this possible in Drupal?
Welcome to Drupal rar!
Colorbox module in Drupal may have different needs (probably attributes on the images) than the similar plugin in Wordpress. Although both are using the same js plugin this does not mean that they work the same way.
From the Drupal Colorbox documentation:
Load images from custom links in a Colorbox
Add the class "colorbox" to the link and point the src to the image
you want to display in the Colorbox.
Are the images set like this in your website? What is the code now for the images you want to display in a colorbox popup?
Did you follow the installation instructions for the Drupal Colorbox module?