Forum Replies Created

Viewing 15 replies - 16 through 30 (of 61 total)
  • By other attribute maybe you mean alt attribute.

    You can just add it to the img tags like on these lines:

    
    <img src="<?php echo $image[0]; ?>" alt="Image description" />
    <?php }else{echo '<img src="'.get_template_directory_uri().'/images/demo/small-feature.jpg'.'" alt="Image description" />';} ?>
    

    However, if you wanted to tidy that up and simplify it a little I think something like this might work:

    
    <?php
    if ( has_post_thumbnail() ) {
    	the_post_thumbnail();
    } else {
    	?>
    	<img src="<?php get_template_directory_uri(); ?>/images/demo/small-feature.jpg" alt="Image alt text"/>
    	<?php
    }
    ?>
    
    • This reply was modified 6 years, 2 months ago by Ryan.
    Thread Starter Ryan

    (@rrhode)

    I figured this out finally. It was a line in the child theme that was setting the login URL to /login

    I personally like to use Laragon rather than WAMP and XAMPP. I don’t know if those have a quick way to install WP locally but Laragon does. You just go to the menu and go to Quick App > WordPress and it will download it for you and then you can install it normally.

    You can download the full version of it and if you want to upgrade any of the apps you can easily do that. They have great docs as well on their site.
    https://laragon.org/

    If you need anymore help you’re welcome to ask =)

    • This reply was modified 6 years, 2 months ago by Ryan.
    • This reply was modified 6 years, 2 months ago by Ryan.

    Your code seems to be horribly broken on this post and on your link. So I think this makes it hard for people to help. You have to post more readable code and explain what your issue is better for people to be able to understand how to help you better.

    All your quotes are wrong, and your statements aren’t enclosed correctly and the code isn’t indented properly. Are you coding in MS Word? It makes it very hard to read and it surely won’t run like that at all. Also with your description of your issue isn’t very clear what you’re referring to.

    You can often change the default PHP version your cPanel if your host has one. You should make sure to check the site health in WP admin under Tools > Site Health to make sure you’ve enabled all the right modules and whatnot. You might want to ask your host to help if it’s too hard to figure out.

    If that doesn’t work you might have to update the PATH variable or you can try to set the WP_CLI_PHP variable:
    https://wordpress.stackexchange.com/a/244170
    https://make.wordpress.org/cli/handbook/installing/#using-a-custom-php-binary

    I know this is kind of old at this point but since I’m here I may as well post it here since I was just looking at this stuff minutes ago. If it doesn’t help you anymore maybe it will help someone else some day.

    You can usually edit them in the WC settings on the Payments tab at /wp-admin/admin.php?page=wc-settings&tab=checkout

    You can also use the woocommerce_gateway_description filter like this:

    function my_woocommerce_gateway_description( $description, $id ) {
    	if ( $id === 'bacs' ) {
    		return 'My BACS description';
    	} else if ( $id === 'cheque' ) {
    		return 'My Check description';
    	} else if ( $id === 'cod' ) {
    		return 'My COD description';
    	} else if ( $id === 'paypal' ) {
    		return 'My PayPal description';
    	} else {
    		return $description;
    	}
    }
    
    add_filter( 'woocommerce_gateway_description', 'my_woocommerce_gateway_description', 10, 2 );

    You can do the same thing with icon (woocommerce_gateway_icon) and title (woocommerce_gateway_title) filters as well except with icons you would output an HTML img tag.

    WC 4.0.0 reference: wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php:304

    Thread Starter Ryan

    (@rrhode)

    No it only happened that one time so far. I have no idea why.

    Thread Starter Ryan

    (@rrhode)

    Hello,

    I was interested in a permalink formatted link that was simpler. I found another plugin that had them. Thanks!

    Thread Starter Ryan

    (@rrhode)

    Awesome, thank you very much!

    Thread Starter Ryan

    (@rrhode)

    Oh nice, glad to see it’s on a todo list!

    I actually do have that plugin installed but it doesn’t work correctly. Extra span tags show up inside the code and I have to edit the post again to remove them. It also doesn’t show the button on the editor toolbar. Is there an option or extension I’m missing somewhere?

    Also another issue then is that I have to enable shortcodes for everyone which isn’t really ideal either.

    • This reply was modified 7 years, 2 months ago by Ryan.
    Thread Starter Ryan

    (@rrhode)

    No, it doesn’t work with multisites.

    I was able to test it out finally but it seems to not work properly. I can’t create new forums. I get a whole lot of database errors like “WordPress database error Table ‘wp121.wpnl_2_wpforo_phrases’ doesn’t exist for query” and then the queries and not just for that table but a lot of different ones.

    So at the very least it seems the database tables aren’t created properly. Only these tables exist:

    wpnl_2_commentmeta, wpnl_2_comments, wpnl_2_links, wpnl_2_options, wpnl_2_postmeta, wpnl_2_posts, wpnl_2_termmeta, wpnl_2_terms, wpnl_2_term_relationships, wpnl_2_term_taxonomy

    wpnl_wpforo_accesses, wpnl_wpforo_activity, wpnl_wpforo_forums, wpnl_wpforo_languages, wpnl_wpforo_likes, wpnl_wpforo_phrases, wpnl_wpforo_posts, wpnl_wpforo_profiles, wpnl_wpforo_subscribes, wpnl_wpforo_tags, wpnl_wpforo_topics, wpnl_wpforo_usergroups, wpnl_wpforo_views, wpnl_wpforo_visits, wpnl_wpforo_votes

    Are there any plans to add multisites support?

    Thread Starter Ryan

    (@rrhode)

    Ahh, that makes sense. Great points and thank you for your detailed explanation!

    Do you develop for something else now? Do you still use WP for websites or is there something you prefer that’s better?

    I actually did end up writing a little plugin to do that. It doesn’t continually remove users or try to prevent them it just runs the process once to remove existing users so they don’t have accounts on the site anymore. Seems to work well. I think it’s particularly useful if there were a whole lot of user accounts created by spammers for some reason and it’s better than trying to manually weed them out.

    Thread Starter Ryan

    (@rrhode)

    No more of those sorts of things exist for me. The error is gone now so it seems ok on that site for now =)

    • This reply was modified 7 years, 11 months ago by Ryan.
    Thread Starter Ryan

    (@rrhode)

    Thank you!

    Doing those data updater processes didn’t fix it but I’ve investigated further and I’ve discovered some interesting things. Since you say it must be related to missing data due to the migration I started taking a closer look at things to see what might actually be going on. I may as well report what I’ve found here in case it’s useful to you or someone else in some way.

    There is a post on the recent posts page which says Last post 49 years ago… Well the posts don’t go quite that far back, only 10 years in the database and that particular post was posted 2018-04-26. 49 years goes back to the epoch time which likely means something is surely missing somewhere if it’s getting a default date there. I’m pretty sure I did the migration from bbpress after the date of that topic so I certainly do believe that it must have been related to the migration in some way.

    Also on the recent posts page it displays no posts under that topic like the others do which I never noticed before. Looking into the database the last_post column there is 0 and so is the first_postid column. There are no posts in the posts table associated with that topic. All created column entries have data in the topics table.

    Therefore, I suspect $last_post['created'] is the cause of the warning near the end of line 93 of recent.php rather than $topic['created'] which is on the same line.

    Also, visiting that topic causes a 404 error, likely because there are no associated posts to display. I don’t know why I didn’t notice this before. It all looked normal until I looked closer just now.

    The title of this topic is: Parse Error/Syntax Error unexpected ‘)’

    I’m thinking that maybe creating a topic with that sort of title may have caused an error in bbpress or perhaps WordFence caught it and stopped it from being posted thinking it was some sort of attack. However it still seems to have been able to create a new forum topic afterwards that went through ok, just no posts for it. Then maybe when I migrated from bbpress it still had that topic with no posts associated with it and wpforo just tries to display it anyway.

    So perhaps, aside from just ignoring the issue, a good solution to such a thing might involve a couple things.

    First maybe adding a simple check to see if forum posts exist for the topic before trying to display it, such as if first_postid is 0 then why should it try to display the post at all if there are no posts associated with it?

    Second, perhaps an additional button in that forum maintenance section that purges topics with no associated posts. Because is there any reason to have topics that don’t have any posts for them?

    Thanks for your help =)

Viewing 15 replies - 16 through 30 (of 61 total)