How can I hard coded comments area to be shown in particular pages in wordpress? - wordpress

In my sites I use static page as a front page, and I did some other static pages to show some special static content (and embedded object) but this page sin particular I want to have the comment area shows.
My question is: how to enable comments -preferred hard code- in particular pages? at least having the same category?
I am using wordpress 4.1 and Avada Theme.

Well you can disable the comments on over all website by going to settings discussion and then uncheck the box that says, allow people to comment on new articles. This will remove all the comments on new pages and posts (starting from now). Now when you create a new page/post click on the button on the top that says "screen options". Check the box that says "discussion". Now you will have a new field in your post from where you can enable/disable the posts individually.
If you want to do it through the code, one way would be to create separate files for each page e.g page-contact.php, So when someone goes to the contact page, this file will be served, it can be a clone of page.php and just needs the comment part removed. Another way would be to goto page.php and wrap the comments code with a condition like
if(is_page('contact') || is_page('about')){
// code to show comments. Comments will be shown on contact and about page
}

Related

Wordpress how to link a page to blog content

This may seem novice, but I assure its not.
So, I have a site, which displays blog posts by date from new backwards.
Standard stuff. However, what I'm trying to do is create a temporary homepage, lets call it 'yogo'. It displays some ad, or image, with a button link.
What I'd like is a direct link to the actual blog feed which displays in a given theme site's frontpage. Is it just a block?
When Im in Appearance->Reading, I can change homepage to 'yogo' fine. But, say a visitor is on 'yogo', and I want a button they click on to link to what would be the original theme frontpage with blog content, it should technically be 'Home' but is that coded somewhere through the wordpress software like the Reading mentioned above.
Maybe Im missing something, should I shut off permalinks, and dig for it in actual page extension?
Im trying to avoid using Guten. or Elem. to build out a blog page.
Any advice, thanks in advance.
Once add your code in front-page.php or home.php you can use get_the_permalink() function to get the blog page URL and will pass in "a" HTML tag like this -
Your Blog Name
Might be it can help you.
Just a quick update. actually solved this.. In simple terms, it is possible to do this really quickly through the Wpress UI. From your backend, these are the steps in the following order:
(firstly. shout out 2 user 'mirchev' because if u didn't point out templates I would of been way off. actually after about an hour of research after that) So it all takes place in Setting->Reading. From what I've read, Wpress started off as a blog based system anyways, so it was solved a long time back. Basically to start, 1. Create 2 pages, no need to add any content as long as they are 'new' and you make note of the names.
2. Also important -in the template area to the right panel when the new page editor loads up (you don't need to add any texts, images or whatever, including the area on the right just make sure "default template" is selected. 3. Afterwards, these 2 pages are 2 be used in the Setting->reading section.
What you want to do is when you enter this setting of your Wpress site, instead of having your "homepage" radio button be "latest posts" set it to 'static page,' and 4. important - select 1 of the 2 new pages you created as the static page. 5. Now, also important, for the posts page, select the 2nd of the 2 new pages you created. 6. Once this is done, what happens is your website loads the static page, which you may customize however, and then you can go into your Appearance->menus and add the appropriate link to the 2nd of the 2 new pages you created to load the blog, or link to it whichever way you choose. More often than not a menu item should appear if that is the setting you customized.
..And that is all. if fact I was very surprised just how smooth it was.
good luck ! ..--'''~~**
Separation!

Cannot create Elementor Posts page in Wordpress although I have selected in Reading page

I want to use my Posts page with Elementor modules.
I have done my Homepage like that
but cannot do the same with Posts page.
I have created an empty page,
added some modules.
And selected this page as Posts page in Reading page.
But when I click a page on my website,
my Elementor Posts page is not seen,
the default Wordpress page is seen.
Update :
I'm using Neve theme on Wordpress v5.8
My website address is Tubefavorites.com
My homepage with Elementor and posts page with default Wordpress has different fonts
and my homepage and posts page's components are in different order.
(In homepage its Tags, Categories, ...
In my posts page its Tags, Last Posts, ...
I'm working online in browser (its not local).
There is no error on Chrome Console.
Update end.
Currently I'm trying this in Turkish pages.
I will make the English Elementor page after I fix this.
How can I fix this?
Thanks
Do you have Elementor enabled for post?
Thus, if I understood correctly, you have created a page post and want to add it as homepage. You should go to settings - reading and select via dropdown the page you have created! Then, you will see your page as homepage and not the default one
There is also an explanation in support forum, that someone has the same problem. Please read below:
"Looks like you’re trying to edit your Posts page that has been assigned in your WordPress Reading settings (Settings > Reading). If this is the case, you may not be able to edit the assigned Posts page directly with Elementor (Basic version).
You can try deselecting the page (in the “Posts Page” box within your Reading settings) then try editing this page with Elementor"
link to the source: https://wordpress.org/support/topic/cannot-load-posts-page-with-elementor/
Thus, disable your page through Settings - Reading, edit/modify (whatever you want) your Post page. After that, you could add your page blog posts URL to the meny item (or use this URL to wherever is nessecary)
EDITED
What plugin are you using for the translations?
I saw your homepage playing correct, right? Thus, you have selected your custom page correctly, through the Settings - Reading.
Now, if you want to see the same results in Turkish, you need to translate your home page too! So, add the translation in turkish language too, or duplicate the english version for turkish one and it will play!
UPDATED
I think there is an issue with the blog page (and single post template, as I am reading in WP forum for this theme). Try to check inside Appearence -> Customize, if there is any options there, thus could change the blog template. Somehow the theme overwrites your options. Furthermore, take a look at the blog theme's doc here:
https://docs.themeisle.com/article/1306-neve-blog-archive-options
I have learned that, I have to use Templates page, in Elementor Pro.
I didn't have been selected it.
Thanks to Hakkı Uçar for this
and for installing and for helping.

Put categories on PAGE url wordpress

Ok, here is the thing I have already added the categories to the pages (with the help of a plug-in, it's called Add category to pages) and so now I want to change the URL to display the categories (that is to say I want my pages to have this estructure: mysite.com/%categories%/%page_name% right now it has his structure: mysite.com/%page_name%), I have tried to google it but I can't find a straight answer. So if anyone has some resources (tutorials, articles) or some idea (if it's not to much to ask with code examples) on how to achieve this it would be fantastic. (And believe me, I'm asking as my last resource)
you can do it easily with "Page Parent" option available in WordPress.
Steps To create a subpage
Go to Administration > Pages > Add New screen.
In the right menu, click the “Page Parent/No Parent” drop-down/page attribute widget. The drop-down menu contains a list of all the Pages already created for your website.
Select the appropriate parent page from the drop-down menu to make the current Page a child Page.
Add content to the subpage.
Click Publish when ready.
Output - https://example.com/asia/india/
More Info. - Wordpress Subpage Permalink
well you can do this for categories and products from permalink setting, but if you want to manipulate the page url according to yourself then you need to create an blank page with the prescribed name whichever you want to insert, i.e, if you want to insert amazon within the url then create an url with name of amazon, and put the other url's under this parent page.
This way your url will look like
http://example.com/amazon/page_name
Unable to post as comment so directly posting it in an answer, in WordPress you can have custom URL. After you logged I'm as admin under dashboard you have general settings where you can put custom URL's like http://example.com/%caregory%/page_name
For more reference also checkhttp://codex.wordpress.org/Changing_The_Site_URL
I don't know if you tried this but after you login as admin, under Dashboard>>Settings>>Permalinks>>Custom Structure.
Let me know if you have already tried that.

Wordpress: show category-page as frontpage

I want to show a category-page on the frontpage without the url changing (eg. redirect).
The frontpage should implement the categories' head and meta tags then and also the top menu should display the appropriate category selected. also there should be a canonical tag to the categorypage so no duplicate content will be generated.
short: the frontpage should exactly behave like a categorypage.
is there a solution?
You can create your own page template and set is as start page.
Go to:
Apperance->Customize
Then Static front page.
Choose "Static Page"
Then choose your page from the dropdown list.
If you need help look at this.
http://codex.wordpress.org/Creating_a_Static_Front_Page
In addition to Tan's answer, you'll need to go to Settings -> Reading and then select 'A static page' for the 'Front page displays' option. After that you can select your previously created page template from the 'A static page' drop-down menu.
When you finish the above, you'll have to edit the source code for the chosen file in order to include a standard wp loop. For more info, please check this thread:
How do I make a Wordpress Page act like the default home page displaying multiple posts?
To control which posts will be shown in the loop use the query_posts(). You can find more details here:
http://codex.wordpress.org/Function_Reference/query_posts

Wordpress blog page

Quick question (quick deadline...I know I can use google).
I'm writing a site on Wordpress w/ a static home page, it has a few pages--I want the 'blog' page to show the wp entries...what's the best way to set this up.
Right now I have a static template for each page (with content rendered), but of course, the blog page doesn't show the posts...
Thanks for the help!
Create a Wordpress Page Template by making a page with any name and this comment at the top:
/*
Template Name: Blog Enitres
*/
Go create a page, use that as the template (there is a selector on the right hand side). Call it whatever and save it. This is your static page.
Then, after that, go down to Settings > Reading and change the 'Home' page to be the page you've created.
Then create an index.php and save it. This will be the template for the displayed posts. Create an empty page and select it at the 'Posts Page' in settings.
To learn more about this functionality go here.
To learn more about the Wordpress loop and how to display entries, visit codex.wordpress.org

Resources