Wordpress Admin - Cannot see all pages - php

For some reason, I've pushed a theme via Git to Wordpress and since then (I am not 100% sure if it's because of that) I cannot see all the pages anymore. I can access them on the front-end and get the page code from inspect element, otherwise I can't edit those pages directly from Wordpress.

It seems that another admin switched the language and I was only able to view the pages made in that particular language. Silly mistake from my side. Thank you for the answers. I will keep the post opened in case somebody goes through the same thing and oversees this aspect.

Related

Polylang is changing my homepage - Wordpress

I just finished my first custom wordpress site, using my custom theme, and now, I was starting to translate the site, I need it to have 3 languages.
So, I installed the plugin Polylang. But, I don't know why, when this plugin is active, my home page that is a custom page (page-home.php) is not being considered the homepage anymore. Since I never used this plugin before and I don't have much knowledge in wordpress, I have no idea how to solve this problem.
Can anyone help me?
I solved the problem. If you are using a custom page as your homepage, you first have to edit it. Just go there and save it, to assign this page to the default language you chose.
After that, you have to go to every page, post, custom post, and taxonomy, and save it using the default language. If you don't do that, the posts or the other contents of that current language will not be shown on the site, cause they have no language associated to it.
Then, you have to create a new version of every content you have on the admin (posts, pages, taxonomies) for the other languages you gonna use.

Wordpress woocommerce weird problems

First of all, thank you for bothering to read this topic, I feel like this is going to be a long and painful one, as I'm trying for about 7-8 hours now to get what the hell is happening with this plugin.
I am a developer, so I know what I'm doing, and this isn't my first page I did using WordPress.
The problem started when I started reading up on woocommerce's documentations which are widely known as quite poorly documented.
Since I made a custom theme, which I have had before already, I've decided to use the overwrite method as well as the woocommerce.php method for customizing the plugin to fit the site as I'd like it to.
The woocommerce_content(); is customized now, and nicely working as well as the product pages (single product page) which are customized as well, and working.
As soon as I try to access the account features, nothing happens. I've tried adding echoes for debugging purposes to the my-account.php, but it does not echo what I write, so I assume the shortcode cannot load for some reason, because it does not reach the my-account.php page as it should, and it points somewhere else perhaps?
Then I've noticed that when I click the "Add to cart" button, it appends the element with a "View cart" button as well, so me thinking this is working, I left it as it is. For like 5 seconds, because right after a page refresh, or navigating to another page, the content of the cart gets empties, I cannot even see the cart page, nor the login page, nor the create account page, or anything in fact.
Everything is working that is inside my "wp-content\themes\mytheme\woocommerce" folder, but nothing else that is inside my
"wp-content\themes\mytheme\woocommerce\any-subfolder"
The woocommerce system status does not show any error, nor the PHP error log, nor anything else.
I have a VERY long list of "Overrides (WooCommerce):" which I don't want to paste here because of reasons.
The only success when I was able to at least get something out from the plugin, is when I used the wordpress function "do_shortcode();" and added the myaccount or cart shortcode myself to a page, THAT worked, and printed it out, however I'd like to use the original method, so the code won't get too complex for later on.
Every other site is working fine, I'm currently running this on localhost, cookies working, sessions working, I log everything yet there is no error, mod_rewrite working correctly, yet I am stuck.
Looking for a patient gentleman to help me on this painful day...
EDIT:
Added "[woocommerce_my_account]" to the "shop" page which page's file is the "woocommerce.php" has actually loaded up the correct my-account.php from "themeroot/woocommerce/myaccount/my-account.php" It echoes out my debug messages as well, so the shortcodes should be working, perhaps this isn't just a woocommerce related issue?
EDIT2:
After fiddling around a LOT, I've come to understand that the wrapper hook it is supposed to do (div id=content and div id=main) does NOT get hooked in it, perhaps it is just a small problem, since I've removed them with remove_action, and the "Shop" page still displayed properly... I have NO idea what is going on with this plugin, but I don't have the luxury of time to fiddle around with it... This is such a pain...
EDIT3:
The plugin works perfectly on any other basic theme, so there is something up with my custom theme. Even after hours of searching the differences between the default theme (twenty-fifteen) and mine, I have not found the solution.
I have solved the problem... It is of course entirely my fault, the problem is just that woocommerce has so poor documentation, I did not really thought about this.
For anyone out there creating custom themes for WordPress, please note that in order for your page.php to actually use the shortcode of the page you have navigated on, you must print out the content of the page (the_content();).
This was my solution for my mistake that took many many hours...

Edit WP html code, but cannot find the page

I am new to Word Press and I have been assigned to change something at work in our homepage.
I am always worked with raw HTML/CSS/php files, so I am a bit out of place here.
The page in question is the following: GAN Integrity Solutions Products
Inspecting the html I found where the CSS is (in the theme folder).
If I go in word press under pages, and I choose Products (which is the page I want) there is not content in it even in the text or visual editor. (but the page does indeed have content)
I installed the plugin called "Always edit in HTML" but it only removes the Visual tab and does not really replace it with the HTML tab (like I have seen a friend of mine has).
Also I am currently using WP v. 3.7.1 and I have not update because I still had to learn what happens when one updates (does it screw up my site? I can't afford to screw it up).
Anyone have any idea of what I am doing wrong or how I can solve this?
Btw the different "products" are created individually under "Portfolio" but what I would like to edit is that first link page html. What I need to do is instead of having pictures in the "squares" and then text as ones mouse over them, the reverse.
I would appreciate it!
Can you try to login in Wordpress?
You should go to pages and search for the product page.
Then check the template part.
Go to your themes map again and search for that template.
Your code should be there.
This is my first comment. Hope it is helpfull.

How do I edit the code of a WordPress site?

I am helping out a family member with their WordPress blog and he/she wanted to have the comments show on the main front page. This way, users don't have to click through the title to add a comment. If that is impossible, he/she wanted to have instructions like "click here to add a comment" near the title.
I know how to write html/css etc., so I would just go in and type in some code but I don't have an FTP account. Is there a way to edit the html of a WordPress site through the WordPress Dashboard menu thing? I would ask for a FTP account, but I doubt he/she knows how to create one. Also, would doing this really screw things up for WordPress? Any and all help is appreciated. If needed I can give the URL, but I would rather not have people trying to post comments and mess around with the site. Thanks!
The easiest way is indeed to have an FTP access and edit the blog's theme directly (in /wp-content/themes/nameofyourtheme. Otherwise, you can also do it from the Admin panel. Go to Appearance, then click on "Editor". You'll then be able to edit all the theme's files.
Edit:
If you want to change the layout of the posts, the file you'll want to edit is single.php.
You can edit the site through the dashboard. When you are making a post you can change it to html and create your own things.
Unless there is a plugin for this. Which there might even be. But, since i have no idea and fast googling said nothing.
You will have to edit the theme files /wp-content/themes/Your-Theme/
You will have to take something like <?php comments_template(); ?> from single.php file and move it to index.php file somewhere after where you should find something like this <?php the_content(''); ?>
single.php Holds the article page.
index.php Holds the "home" page.
Is this hosted in wordpress.com?
In the control panel you can find Appearance > editor in there you can edit the files. Thought i think that it is very likely that you wont be able to save your edits due to file permissions.
Also if its a paid hosting they quite often send you these details on email.. I mean Ftp acc and pass.

Get Wordpress sidebar from another Wordpress blog?

I want to write a plugin that will pull a sidebar from one Wordpress blog and place it in the sidebar of another blog. I know to write a plugin, but actually don't know where to start with this idea.
I believe he's saying that he wants to write a plugin to be able to retrieve a sidebar from another website and display it (possibly as a widget?). If that is not the question then I apologize; otherwise, I'll take a shot at answering.
The first thing I would recommend would be to view the code of just about any other widget plugin to make sure that a plugin (and not just some JavaScript) is really what you want.
Assuming you want the plugin, check out this resource for some basics. Also, you'll need the retrieval code which will either be "screen-scraping" in PHP or AJAX partial page loading with JavaScript.
I hope any or all of this helps you get where you're going.

Categories