My Drupal is displaying a simple custom view, with a nodelist.
The trick is that my view displays comments under nodes in the list.
That is too much for one page and I need to get a list of pure nodes and hide comments under ReadMore link.
I've tried to play with comments settings for my the custom node type I am displaying,
but even if I choose "Display on separate page" - the comments themselves still remain in the main grid.
How to I move comments under ReadMore link to make them invisible in the grid?
Ahh the joys of theming views.
View Theming guide
This guide should be enough to get you started.
I'd recommend using the views-view-VIEWNAME-field.tpl.php as opposed to writing a theme function.
Hope this helps
Related
I'm relatively new to Gutenberg development. So forgive me if it's a silly question. I have a page in which a paragraph is always inserted by default. I'm assuming this is a template that can be edited and swapped out for a custom block or template?
Yes paragraph is often the default but clicking on the '+' button highlighted there, you could access the search bar and choose whichever type of block you'd like.
Example of search bar
It's also possible to create reusable blocks by right clicking and saving it. Makes things faster.
Creating reusable blocks
I found this helpful with learning WordPress.
LinkedIn Learning WordPress Essential Training
Hope that helps.
In Drupal 7 I created a views page, and I want users to have the option to view the results either as a list, or with thumbnails (like on a lot of websites). The only way I can think of doing that is creating one page with the results as a list, and having a link to another page with the results that have thumbnails.
But my question is, how do I add just a random link to the top of my block page that will direct users to the 'thumbnail' page?
I tried to use 'unfiltered text' in the header and put the html for a link in there, and when I went to the page it looked like a link, but I couldn't click it. Any suggestions?
For every view you can create set of templates to style it. When you edit you view open "Advanced options" and then at bottom click on "Theming options" (or suggestions...can't remember real text).
That way you'll get a very useful popup which displays all templates used by view...in specific theme. So if you want to change some template just click on it's original name, pick up it's original code (copy) and create a file. Save it at your theme templates directory, pick some of suggested names, add your link or what ever html you need and clear the cache.
Templating is a bit broad subject to discuss in details for you questions's answer - find some tutorial on net, but general idea is to use custom view template and store your html there.
BTW, I hope you have only one view and different displays for you different pages.
I want to add widget in second layer of wordpress menu. and it should be changable from admin panel. as for example if i add calendar widget in second layer than it can be move to another menu or should be able to add another widget.
It might be a little too late, but here's the solution I've found to this problem. It might still be helpful to someone out there ;P
First I tried making use of the Max Mega Menu plugin, it was giving too many features I didn't need besides the ability to add widgets to the menu.
But the following plugin takes care of that in a very simple and practical way: Widgets in Menu.
Give it a try, this one did it for me ;)
I am building a custom WordPress theme and need to add descriptions to my custom menu links. According to WordPress, there is a way to do this:
"The description will be displayed in the menu if the current theme supports it."
Does anyone know how to support this?
Thanks in advance,
Tim
Wordpress' documentation on this is misleading. It actually took me quite some time to find out how to do this myself. As long as your theme supports menus (meaning, you've Registered a Custom Menu within functions.php or elsewhere), you can add Link Descriptions and other useful information by default.
In order to SEE these options, go to Appearance->Menus and click on Screen Options (up in the top right-hand corner of the screen). You will be able to enable the options you like under "Show advanced menu properties".
im using Views to output a block, containing latest post titles - simple and working. id now like to add some text links that should be different than the "more" link you can add through the Views UI. they are basically just p-tags with a-tags inside, pointing to a url of my choice.
right now i just inserted the markup in Basic Information > Footer > Full HTML.
is this the standard way of achieving what im after?
You can write custom templates for each row in a view if you want. Have a look at views 2 theming
Theming is a good way to do it but then it adds an additional responsibility to move the theme file when you move the view from one site to the other.
The header and footer are provided so that you can add html and php code to it, so it is definitely the right way to do it or else it would not have been provided in the first place by the module developer.
Also if the urls are related to the drupal site then I would suggest you to use php mode and add the link using l function (http://api.drupal.org/api/drupal/includes--common.inc/function/l/6)