I got Django CMS and Zinnia set up, working fine. Now I would like to display the content of the latest Zinnia post on the front page.
{% get_recent_entries 1 %}
Adding the above to my template will display the title of the post linked to the content page. But I would like the content itself to be displayed right away, and I wouldn't care about the link to the full entry. Is there a way to do this in the template and if so, how? Or do I need to write my own code?
This is my first Django project, so be easy on me, ok =)
Related
I have wordpress and am using Elementor editor. I have added a page that is meant to be a template for each new pages. I added a block with breadcrumbs to this page. I want this page with breadcrumbs on evey new page that i create. Copying this page all the time creates problems, e.g. if I wanted to change something in this block so I must do this on every subpage. I do not know how to do it - all i want its one static page with that breadcrumbs that includes to every new page i create, and when im change something in this page, changes will appear on every page.
Help :( Photo below
https://i.stack.imgur.com/G1EyI.png
Use the "Template" block in Elementor
That is achievable with Elementor Pro using theme builder option.
Create that template as a single page template and then in display options choose to display it on all pages.
Creating a Single Page Template with Elementor Pro
Then you should use standard page editor or custom fields to put content that is then going to be rendered by the template.
Doing that will let you make changes on all pages at once by editing the template.
I have: index page of website with a section for latest news (short version with a link).
I want: the link in short news have to direct to another page with full version. For every news this page will be similar. Can I do it automatically? In WordPress I will add new post and I don't know how it will create new page of website with a link on it, using my template of this page.
In the news template, right side of the side bar, you can select the template, usually it comes with default template,
Change it to Blog template. Then you can work on it further.
Good luck
I am using an older version of WordPress 3.5.1.
I know how to use different templates on different pages but the problem is I cant figure out how to set a different template for my blog page. When I open the page Blog in the Edit Mode I see a blank page, contrary to my other pages which display their content. Is it possible that this page is a redirected from somewhere else and how can I figure it out? Also when I change the template from Page Attribute it does not take effect. On any other page it works but this one. How can I figure out how to change the page template?
There's no built in selectable templating system for blog posts. Its based on the actual template files and their hierarchical structure.
http://codex.wordpress.org/Template_Hierarchy
Its probably your index.php or single.php that is throwing an error. I would go into the wp-config.php and find the line that says define('WP_DEBUG', false); and change that to true. Then reload the page and see if it spits out an error. A basic loop is only a few lines of php, so I would guess there's an error somewhere on the page.
As for the pages not changing when you change the template, its possible there is conditional code or something in the template itself. Are you saying it only changes the look of the page on some pages but not others?
For all pages, Wordpress give us a default page template : page.php. That's clear and simple, by default all pages use this template. Then, Wordpress give us a page template system, and when we speak about template we think reusable so we think about page layout template.
For example : full-width, page-width, sidebar-left... You specifie the template to use for each page, it's ok.
But when you begin to work on a more complex web site, your content will not be a simple post (page type) inside a page template anymore. For a reason or another you have to use another feature of Wordpress : page-slug.php. Before, of course you can try to do shortcode for everything you develop, include specific plugins only for your complex page etc but ONE DAY, you will have no choice to use this page-slug.php.
Here comes the problem : the content is "more specific and complex" but you still need to use your layout template, and you can't... Of course, you hate duplicated code so you don't want to just "copy" your template inside.
If we really want a specific page, we use the page-slug.php without a page template and it do the job. Then...
Why Wordpress don't consider the page-slug.php as pure content when (and only when) a page template is specified ?
Am I missing something ?
Thanks
I am building a theme that has a lot of custom templates, like every page. Ridiculous, but for some reason the template I made for the "postings" page is not getting the posts? I have set the post page in reading preferences, and I have set the page to use my template, but it still publishes posts to a default template. Of all the customization I built into this I did not expect the blog part to give me trouble! lol Anyone run into this kind of thing?
Thank you.
The way I usually to it is to have standard setting in reading preferences.
Build my front-page in index.php
Build a template for blog posts
Add a page and assign the blog post template
Of course you then have a kind of placeholder page sitting amongst the other pages, don't really like that. But it works.