holdstrong
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Child Themes – I don't get why I should use themBy the way, thanks for walking me through this and being patient as I try to understand it!
Forum: Themes and Templates
In reply to: Child Themes – I don't get why I should use themRight. That I understand.
The scenario I am talking about is when you customize one of the php template files. I used main.php just as an example… think of it is a custom edit of page.php or footer or header or any common template file.
So you move the main.php file from the Parent to your Child Theme and then make edits to it. Your theme now uses the customized main.php in your child theme, not the one in the Parent.
Then, you find out the developer has an important update for your theme. One that includes an update to main.php that you want, and that does not specifically affect your custom edit. (let’s say the update addresses code on line 2, your custom edits were on line 200)
You update your theme, but this updates the Parent main.php… not the Child’s main.php, which your theme is using.
The only way to update your themes main.php, if I understand this correctly, would be to manually merge the two.
That is exactly the same thing you would have to do if you were just editing the parent theme directly, instead of using a child theme.
This is why I don’t understand why using a child theme makes it easier to update your theme. I suppose that is true if, and only if, you don’t care about updates to the files you have placed in your child theme?
Forum: Themes and Templates
In reply to: Child Themes – I don't get why I should use themThanks govpatel,
But by doing that, you are not getting the updates for the files that are in your child theme… right?
If you took main.php from the parent, and copied it to your child theme and then made edits to it… when you update the parent theme, the parent’s main.php is updated, but not your child main.php.
Forum: Themes and Templates
In reply to: Child Themes – I don't get why I should use themYou may know better than me, but my understanding is that if an update affects a particular file, it will replace the whole file,
Yep, exactly. That is my point. A theme update will replace the entire file… so if I want the update, because it updates parts of the file I haven’t customized, it would replace the entire file including any custom code I have inserted into that file.
This is true whether I use a child theme, or just edit the parent theme directly.
That is where I hit a roadblock when thinking about using child themes.
Forum: Themes and Templates
In reply to: Child Themes – I don't get why I should use themHmmmm, someone just mentioned to me that “hooks” can help with this problem.
Will have to look into it, but it seems like if you wanted to edit some php in a template file you would (instead of tweaking the php) insert code that calls a “hook” and then keep the desired code edits in what I assume is a functions file.
Seems like a round about way of making edits, but it would preserve the ability to do updates to the core files without losing those edits.
Now if only some of the plugins I like to use would fix their problems with working with child themes.
Forum: Themes and Templates
In reply to: Child Themes – I don't get why I should use them“As for updates, if you’ve decided you don’t want the parent theme code in a particular file, why would you want the updates?”
If the theme developer updates their theme, they might make changes to parts of the php files that do not affect the code I customized.
In other words, I would want the update for everything I haven’t specifically changed. If I change 3 lines of code in a php file, that doesn’t mean I don’t want the general update to the rest of that file.
My understanding is that whether you use a child theme or you tweak a parent theme directly this problem would have to be handled in the exact same way. You would have to keep track of your changes and manually update the file on your own.
So it seems like a wash to me as far as php updates are concerned… and a ‘custom.css’ file provides the exact same functionality as a child theme css file, as best as I can tell. E.g. you can update the theme and it won’t overwrite your css edits.
Forum: Fixing WordPress
In reply to: WordPress static pages not indexedWell, in case anyone else has this issue and stumbles upon this thread. I was unable to determine what the problem is. But have decided to scrap ANY wordpress page that I need good SEO on. Pages just do not seem to be getting the attention of posts. So I am turning all of my pages, into posts.
If anyone has an explanation or a better strategy, please do let us know.
Forum: Fixing WordPress
In reply to: WordPress static pages not indexedTurns out they ARE being indexed. I was just able to find the page I gave as an example in google.
But clearly my pages are not being ranked very high, in comparison to my posts. Wonder if I should just convert all of the pages that do not need to functionally be pages… to posts.
Forum: Fixing WordPress
In reply to: 301 Redirect and permalinksExcellent info. Thank you!!
Especially about the length of the URLs. Something I was not aware of. I have been letting WP take care of it and it seems to just auto-generate that from the title. I’ll be more careful.
Now if I can figure out why my static pages are not being indexed ??
Forum: Fixing WordPress
In reply to: “Popular Posts” script that returns permalinksWas able to answer my own question. Hope this helps someone else:
<?php query_posts('orderby=comment_count&showposts=6'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?> (<?php comments_number('0','1','%'); ?>)</a></li> <?php endwhile; ?> <?php else : ?> <li>Sorry, no posts were found.</li> <?php endif; ?>
Forum: Fixing WordPress
In reply to: 301 Redirect and permalinksI was under the impression that having people link back to URLs that include the title of the post and whatever keywords are in that title would qualify as an SEO issue, and not just cosmetic. No?
Having this link out there: https://www.mysite.com/keyword-filled-title
Sure seems a lot more SEO friendly than having this link out there: https://www.mysite.com/p=23
Furthermore, it is also my understanding that the issue of duplicate content and splitting pagerank comes into play if you are not 301’ing the latter.
Forum: Fixing WordPress
In reply to: 301 Redirect and permalinksYeah, they are forwarded properly. But they are not 301 redirected.
As I understand it, 301 redirect is necessary because it tells search engines that the ‘bad’ URL is ‘bad’ and to not use it. Which ensures only the good URL is indexed. The benefit of indexing the permalinks, instead of the ‘ugly’ p= links are that it increases SEO via use of keywords in the URL
Forum: Fixing WordPress
In reply to: 301 Redirect and permalinksI believe we found WHY google is indexing the ‘ugly’ links. Our footer is running a ‘popular posts’ script that is not using permalinks. We can fix this.
But I am still looking for information about how you would 301 redirect ‘ugly’ links to ‘pretty’ permalinks.
Forum: Fixing WordPress
In reply to: 301 Redirect and permalinksI do yes, and it includes the correct permalinks.
According to google webmaster tools, it is reading it just fine. I used the google xml plugin to generate it.