csloisel
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeForum: Fixing WordPress
In reply to: Posts have been hackedWhile it’s hard to say how exactly it happened without digging through logs and doing an entire security audit, I have a guess. WP 4.7.0 and 4.7.1 had a particularly severe vulnerability, one of the worst I’ve seen since working with WordPress.
Basically there was an unauthenticated endpoint on the new REST API stuff exposed in those versions that allowed anyone to send POST requests and update content. It was patched in 4.7.2 and you can read more about it here: https://make.ww.wp.xz.cn/core/2017/02/01/disclosure-of-additional-security-fix-in-wordpress-4-7-2/ and here: https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeYes I would just switch the thumb variable value the same way you are switching the post type variable.
- This reply was modified 9 years, 2 months ago by csloisel.
Forum: Fixing WordPress
In reply to: Post repeats several times on section of pageThese sections should be controlled in the Customizer. In the WP admin go to Appearance > Customize then Click on ‘Theme Options’ then make sure you don’t have the same page selected for Front Page Section 1-3.
Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeWhy not use the built-in archive for the post type and just create post type archive templates? Then you wouldn’t have to mess around with custom queries. Unless you have the need for using pages, like the need for editor content, I would recommend that approach.
As for your current approach, it’s hard to debug with partial code and no explanation of what isn’t working. And I really can’t figure out what you are asking with the
$thumbvar, maybe explain what you are trying to do there.That being said, your logic with the queries seems to be on the right track. How are you controlling the variable value between pages? If you post the entire archive template this might be easier to assist you with.
Forum: Fixing WordPress
In reply to: M4A audio file will upload into Media but not playIt looks like the file isn’t encoded using a web safe codec. What is your encoding process? Try using MP3 or AAC encoding.
Yes but you can always use the slug to lookup the term and get the name using get_term_by().
I recommend using get_query_var() to look up the post type, and the terms instead of relying on the post_ids. This will give you the queried values instead of the values of the first post which you are currently doing.
It depends what you are trying to do here. Your code says put the terms of the post in the title, but there are no posts to get the terms of. Are you trying to display all terms when there is no title? What is the goal?
Forum: Fixing WordPress
In reply to: Add a next button for posts and pagesThis functionality does exist inside of WordPress but it is the job of the theme to display and use this functionality if it is desired. Or do you mean a button in the admin area?
- This reply was modified 9 years, 2 months ago by csloisel.
What your seeing is a 404 query so you are going to have to check if the page is a vehicle listing query and a 404. Get post type won’t work since there is no posts to check the type on. The location and model stuff isn’t going to work when there are no posts though.
Forum: Requests and Feedback
In reply to: Global Add for categories and tags.I’m not sure I see the benefit here. Tagging or categorizing every single post with the same term feels like it defeats the purpose of having a taxonomy in the first place. I’m struggling to think of a use case where this would be helpful.
Forum: Fixing WordPress
In reply to: responsive header imageTry:
.site-header-image .site-header-image-img { width: 100%; object-fit: contain; }Text isn’t great to have in an image because it is static,and it can’t be changed dynamically. So when the image is scaled down, the text is as well, and there’s nothing you can do in that situation to change it. Alternative one would be doing the text in html/markup so that it can be styled differently on varying viewports. A second alternative would be to keep the image in text but have separate images per viewport that have an optimized layout and readability when scaled down.
Forum: Fixing WordPress
In reply to: Problem with my navigation menuIt will show mobile version if the window is smaller than a certain size not just on mobile, so it is possible on a laptop. Removing the mobile styling will require some custom css to override the theme styles or removal of the mobile styles from the theme.
- This reply was modified 9 years, 3 months ago by csloisel.
Forum: Fixing WordPress
In reply to: Problem with my navigation menuAre you viewing your site on a smaller screen than normal? I have a feeling you are just seeing the mobile version of the menu for the first time, which as far as I can tell has always been in the theme.