simplistik
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Classy wp_list_pages] .last class bug when item has childrenI think there’s an error in the logic that was implemented in 1.3.1 due to this thread. The output is incorrect. If we take one of these examples:
<li>Menu 1</li> <li>Menu 2 <ul> <li>Foo</li> </ul> </li>
according to what was mentioned above and what it looks like it’s doing on the list output it’s doing this:
<li class="first">Menu 1</li> <li>Menu 2 <ul> <li class="first last">Foo</li> </ul> </li>
Which even this is close but not correct IMO. It should be:
<li class="first">Menu 1</li> <li class="last">Menu 2 <ul> <li class="first last">Foo</li> </ul> </li>
But even after that suggestion here’s what the current output is doing:
<li class="first">Menu 1 <!-- correct <ul> <li class="first last">Foo</li> <!-- wrong <li>Bar</li> <li>X</li> <li>Y</li> <li>Z</li> <!-- wrong </ul> </li> <li>Menu 2 <ul> <li class="first last">Foo 2</li> <!-- wrong <li>Bar 2</li> <li>X 2</li> <li>Y 2</li> <li>Z 2</li> <!-- wrong </ul> </li> <li>Menu 3 <ul> <!-- wrong <li class="first last">Foo 3</li> <!-- correct </ul> </li>
which is wrong. It should be showing:
<li class="first">Menu 1 <ul> <li class="first">Foo</li> <li>Bar</li> <li>X</li> <li>Y</li> <li class="last">Z</li> </ul> </li> <li>Menu 2 <ul> <li class="first">Foo 2</li> <li>Bar 2</li> <li>X 2</li> <li>Y 2</li> <li class="last">Z 2</li> </ul> </li> <li class="last">Menu 3 <ul> <li class="first last">Foo 3</li> </ul> </li>
the two classes “first last” should only ever show up on an item that has <= 1 sibling. what it’s doing now is showing “first last” on the first item of every single first sibling. I started to mess with it but the string reversing is wiggin me out LoL.
Forum: Fixing WordPress
In reply to: Can’t edit my blog.you don’t have enough privileges
Forum: Fixing WordPress
In reply to: Can I delete original site after implementing 301 redirects?Got ya, I see. Well personally, I know that 301 are completely valid redirects. What I think this is saying though, is to try not to completely redirect traffic to say the homepage, a many-to-one relationship. So if someone goes to
oldsite.com/page1
oldsite.com/page2
oldsite.com/page3etc
it doesn’t just go to
newsite.com/
it should have a 1 to 1 relationship, so what they want is for
oldsite.com/page1
oldsite.com/page2
oldsite.com/page3to goto
newsite.com/page1
newsite.com/page2
newsite.com/page3I believe that’s all they’re warning you from, however with WordPress if you try to go to newsite.com/page2 and it doesn’t exist, it’ll give a 301 permanent redirect to a 404 page, which to me, is completely valid if the article/page doesn’t exist anymore. Ultimately though, manually typing each and every url/uri in for a redirect on your site would be a pain in the arse to maintain. And this is just my opinion of course. However, I’ve never seen anyone do manual redirects to all their pages.
Forum: Fixing WordPress
In reply to: Can I delete original site after implementing 301 redirects?are you doing it through htaccess? you should be. if you are then yes you can remove everything besides htaccess. your code should look like:
Options +FollowSymLinks RewriteEngine On RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
and it is a “blanket” redirect but as far as any search engine is concerned it’s any page’s individual url. it would be ridiculously counter intuitive to hard code each existing url.
Forum: Fixing WordPress
In reply to: How to export XML automatically for every new posts (any plugins?)couldn’t you just use the rss feed? after all it is xml
Forum: Fixing WordPress
In reply to: Theme php errorYou can post the code … my crystal ball ran outta batteries ??
Forum: Fixing WordPress
In reply to: How to set home page and posts page the sameThe top of your index.php page will look something like this:
<?php get_header(); ?>
if you change it to:
<?php /* Template Name: Whatever Template Name You Want to Give */ get_header(); ?>
it will then show up in the “Template” dropdown when you create/edit a page under “Attributes”. So if you go into your homepage … or whatever, you can select that template, and it will effectively turn it into the exact same page as your blog entries page. And index.php still work normally as it should, it’s just now available to be used in other pages as a template.
https://codex.www.ads-software.com/Pages#Page_Templates
https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_TemplatesForum: Fixing WordPress
In reply to: How to set home page and posts page the sameJust turn your “index.php” into a template and assign that template to the homepage
Forum: Fixing WordPress
In reply to: fixed text on post category.if ( in_category(x) ): $static_content = 'some static content'; echo apply_filters('the_content', $static_content); endif; the_content();
Forum: Fixing WordPress
In reply to: Sub-menu disappears when changing post pageWhat submenu? Where? What’s your code look like on this page and on the index page (the default)?
Forum: Fixing WordPress
In reply to: I’m going blind tring to find the error…help pleaseUhhh LoL, I don’t quite understand what you’re asking. But are you asking for the excerpt that is in the
is_page('home')
condition to be the excerpt of another page? or rather the home page isn’t displaying the home page content? if it’s the later you probably need to reset the query just put
<?php wp_reset_query(); ?>
after the ending </div> or “the loop”
https://codex.www.ads-software.com/Function_Reference/wp_reset_query
Forum: Fixing WordPress
In reply to: Display only posts from specific cateogry?just before “the loop” in your pages you can do:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php if ( in_category(8) ) query_posts('cat=8&paged='.$paged); ?>
the $paged variable allows it to paginate properly based on category, if you’re using it in your index, archives or search
Forum: Fixing WordPress
In reply to: I’m going blind tring to find the error…help pleaseI just meant the alternative syntax, it’s not “wordpress” syntax but it’s just what they use for a lot of their stuff, https://php.net/manual/en/control-structures.alternative-syntax.php
things like
if (): elseif (): endif; /////////////////////// while(): endwhile;
instead of
if () { } elseif () { } /////////////////////// while() { };
makes it easier see where blocks begin and end
Forum: Fixing WordPress
In reply to: Search Questionhttps://www.ads-software.com/extend/plugins/search-unleashed/
or
https://www.ads-software.com/extend/plugins/search-everything/
allows you to filter pages or posts, amongst other things
Forum: Fixing WordPress
In reply to: I’m going blind tring to find the error…help pleasetry, i just reformatted “wordpress” style. it’s easier to read and see where things are opened and closed properly
<div id="sidebar3"> <div id="nav"> <ul> <?php wp_list_pages("title_li=&exclude=12,16,23,339"); ?> </ul> </div> <?php if ( is_single() ): ?> <h2>Past Newsletters</h2> <?php wp_get_archives('type=postbypost'); ?> <?php elseif ( is_page('home') ): ?> <h2>Latest Newsletter</h2> <?php query_posts('showposts=1'); ?> <?php if ( have_posts() ): ?> <?php while ( have_posts() ): the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a>"<?php the_title(); ?>"</a></h2> <p><?php the_time('F jS, Y'); ?></p> <?php the_excerpt(); ?> </div> <?php endwhile; ?> <?php endif; ?> <?php elseif ( is_page('membership') ): ?> <h2>Membership Form</h2> <a href='https://www.mywebsite.com/wpcaluwild/?page_id=16'>Please take a minute to join us by filling out our membership form.</a> <?php endif; ?> </div>