seansean11
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: the_permalink Function Incorrect After Custom Post Type RewriteSo, after all of that testing and wasted time, this turned out to be something incredibly stupid.
When I had made the slug rewrites, I had also changed my custom post type name from ”casestudy” to “case_study.” I was setting up post data based on an Advanced Custom Field’s relationship field that I had set to restrict to the “casestudy” custom post type. When I made the name change, the relationship field kept the slug data of the “casestudy” post that I chose but defaulted back to restrict the fields as “posts” because “casestudy” no longer existed. So the URL’s went from
https://example.com/projects/case-study-title
tohttps://example.com/case-study-title
.Once I went back into the Advanced Custom Fields plugin and hooked the relationship field back up to the “case_study” custom post type, the_permalink started working correctly again.
Forum: Plugins
In reply to: [JS Archive List] Custom post type categories not shown in the category list?Excluded categories weren’t working when I tested my result, and I realized that I needed to add my custom taxonomy here too:
{$wpdb->term_taxonomy}.taxonomy = 'YOUR_CUSTOM_TAXONOMY'
You’ll find this in a couple different parts of the plugin.
Forum: Plugins
In reply to: [JS Archive List] Custom post type categories not shown in the category list?Sorry for hijacking the response on this post, but it might be helpful for @vijaykumarvemula to hear how I was able to get the plugin to work with my CPT’s.
After I changed the sql queries to use my custom post type, I also went and changed the excluded cat line to also include just the taxonomies from my new CPT
$cats = get_categories(array('child_of' => 0, 'hide_empty' => 1, 'hierarchical' => 1, 'taxonomy' => 'YOUR_CUSTOM_TAXONOMY'));
You will also need to set up the date archive rewrites for your CPT (https://stackoverflow.com/questions/14486792/custom-post-type-yearly-monthly-archive) because WordPress does not include this functionality out of the box.
The plugin also utilizes the
get_the_month
andget_the_year
functions, which do not support CPT’s. You can find these in the buildHtml function. You will need to change these functions to something like this https://ericholmes.ca/custom-post-type-date-archive-links-in-wordpress/. Just make sure the function loads before it gets called in the plugin. That’s how I was able to make the plugin work for my CPT’s.Forum: Plugins
In reply to: [JS Archive List] Custom post type categories not shown in the category list?That does not fix the buildHtml function, where the links are still being set for regular posts. I’m going to dig around and see if I can get this part to also work.
You can change the code in the jquery-archive-list-widget.php inside the plugin. You should find various instances where you can change the sql query to post_type=’YOUR_CUSTOM_TYPE’.
Forum: Fixing WordPress
In reply to: Passing A Size (Array) to the_post_thumbnail FunctionYour’e right…. I can’t believe I didn’t notice that. It isn’t actually a cropped image that is being output. Seems as though I will need to just find the right balance between registering new image sizes in WP and on-the-fly methods. Too bad you can’t just register image sizes for certain post types or pages.
Forum: Plugins
In reply to: [Plugin: Advanced Custom Fields] Backslashes stripped from sub_fieldStupid mistake. I was using double quotes within double quotes in the PHP.
Forum: Fixing WordPress
In reply to: Problem Building Image SliderOk so where I’m at now I am now getting what I want. A simple output of featured images from a certain category. Here is my code
<?php query_posts(array('category_name' => 'las-bufandas', 'posts_per_page' => 3)); if(have_posts()) : while(have_posts()) : the_post(); ?> <li> <?php the_post_thumbnail(); ?> <p><?php the_excerpt(); ?></p> </li> <?php endwhile; endif; wp_reset_query(); ?>
I know that since this isn’t the main loop of the page (I actually don’t have one as it is a 1-page theme with various sections and acts more as a cms than a blog), that I should be using WP_query instead of query_posts with a reset. I haven’t really figured that out yet, but at least what I have is working and it is so simple!
Forum: Fixing WordPress
In reply to: Problem Building Image SliderThanks so much @datdesignguy. My ideal situation would be to make a featured image slider from posts in a specific category. I just assumed, seeing that “category” was a potential parameter for the get_posts array, that I could pull all of the attachment images from posts of a certain category using this query (despite the fact that the tutorial is for a single page/post).
So, I ideally would like to have a featured image slider. I’m probably going to duplicate this code on the same index.php file because I’ve created a one page portfolio with various sections. There will be 2 sliders. The first will be just a feature image slider (for the posts of one category), the second will be content, featured image and title (for the posts of one category).
I’ll be spending the day working on wordpress loop tutorials/studying Rockstar WordPress to see if I can get a start on this. Please get back to me if you see the message.
Thanks Again,
SeanHey, I just got this same message and I believe it started when I moved my wordpress install to a sub-folder. I am also trying to install the plug-in on another site, which ALSO is installed to a sub folder. I got an error message when I went to authorize the Add Link To Facebook Plugin saying that there was no index file (meaning it was searching in the wrong folder for a file).
To explain…for security reasons, I install wordpress into a sub-folder with a random name. Then, I pull the index.php and .htaccess into the main folder. From there I only need to modify the index.php so that it runs correctly.
I got this method from the Digging Into WordPress book, but am ready to ditch it as it has caused me countless problems with themes and plugins. So here’s the question: Is it probable that this type of installation is causing the problem with the plugin??? And if so, is it possible to modify the plugin so that it will work???
I’d appreciate any type of help!!
Forum: Plugins
In reply to: [Plugin: Shailan Dropdown Menu Widget] No Dropdown with Sidebarcan anyone help me with this?? The jquery seems to be functioning fine. I’m at a loss as to why this might have happened
Forum: Fixing WordPress
In reply to: Contact form issue: static to wordpressThank you esmi. I use contact-form-7 on my other wordpress site. It’s good to know that the current static contact is a lost cause because now I wont waste any more time trying to tweak it.
Forum: Plugins
In reply to: [Plugin: NextGen Gallery] Zoom effect-picture outside of page frameI fixed the problem…it had nothing to do with the nexgen plugin. Just needed to get rid of old code from the static site that didn’t apply on the new dynamic site.
Forum: Plugins
In reply to: [Plugin: NextGen Gallery] Zoom effect-picture outside of page frameit seems as though the #jquery-overlay is in the body on the gallery too, which makes me more unsure about what the issue might be.:/
Forum: Plugins
In reply to: [Special Recent Posts] [Plugin: Special Recent Posts] SRP ProGrazi!
Forum: Plugins
In reply to: [Special Recent Posts] [Plugin: Special Recent Posts] No Recent PostsLooks like when I deactivate qtranslate it works perfectly fine. Anybody have a solution to this, so that I can run both special recent posts and qtranslate?