I have a site created in Drupal 6 and am having problems with a particular page.
The page uses a specific content type (type_a). This has it's own page template (page-type_a.tpl.php) This all works fine.
I've then added a view onto that page using views_embed_view(). This view has pagination.
The first page looks great (URL = /my-page), the template is right, the view appear and so does the pagination.
However when I select another page on the pagination the page reloads correctly (URL - /my-page?page=2) all the content is correct, the node data is there as is the new page of the view. However this page has now fallen back to the default page template.
Anyone know how I might get around this?
Thanks
You can add template suggestions in your preprocess_page function to have it always use any template for a chosen url.
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 have installed the WooCommerce Product Search in my site and all works fine, but there is a small issue with the result page shown.
The result page used is the same than the one used as the main shop page, so the issue is that one slider and info should not be shown in the result page. This content has been put into the description textarea within the Edit Page using short codes.
I have the archive-product.php file open and do not know to avoid this.
I think I should use the is_search() function to check if page should renders on one way or another, but do not know what part of the code treat the info from the page description.
Anything I do inside our Wordpress CMS for some of our pages does not reflect on the actual website. It's like as if it's disconnected. The other pages are confirmed connected though.
Why is this and where should I look especially that it happens only to selected pages?
Btw, I probably should've indicated a sample of the problematic pages. Here's one: http://www.criminal-lawyers.com.au/courts/locations.
Look the template of effected pages.
Take that page on admin panel on the right side of that page you can see page attribute section ,Look on the template that set for that page. It may be a static template that do not accept the content.
Just change the template to default template.
Then view that page .If content are reflected then request the developer to do that in the selected template also.
(NOTICE:entire style of the page is lost.You need to reselect to previous template and save it after seeing the change )
I'm trying to use a posts page in Wordpress. For the uninitiated, this is a page (other than the home page) which features all your blog posts. You essentially turn on the static home page and point Wordpress at a custom index. Then you tell Wordpress to use another custom template as your "posts page"; thereafter, any post you make will wind up there.
My custom template for the 'Blog' page shows up as expected until I define it as the posts page. When I do, the template reverts to my custom index and I get no posts. When I undefine it as the posts page, it goes back to my template. What am I missing? I'm new to using this method, as it used to be done with a plugin prior to WP 2.9
So, I figured out the solution and wanted to share. Thanks for all your input, everyone.
The problem was with the name I chose for the template. I had called it "blog.php", which works fine when creating an ordinary page template. But when using a page as a posts page, Wordpress has some specific setup rules. The pertinent section of documentation, which I scoured the entire internet for using hours of my life I'll never get back, is hidden here:
Also, any Template assigned the Page will be ignored and the theme's index.php (or home.php if it exists) will control the display of the posts. (from here).
So, I named my template "home.php", since I wasn't using a home.php in this particular install, and I was off to the races. Anyway, thanks for the answers!
BTW, I think this may have been what Richard M was getting at.
Your problem might be in creating "templates" and the single post (single.php) You can create a template for any of your pages by putting this in the top of your page (after the first < ? php:
/**Template Name: ****templatenamehere**** #package WordPress * #subpackage Default_Theme */
...rest of code
This allows you to create a page called "posts" which references your new template. This way you can create a new template and then call it through a page. If this is confusing or you have tried this let me know and I will try to give you more details if you need. Thanks