CHomko
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Fatal error: Uncaught Error: Class ‘PasswordHash’ not foundI solved my own issue. I found that somehow the MySQL table wp_options became corrupted. I had no backup of the database. I replaced the bad table by creating a new empty MySQL database on my server then uploading a new wordpress.zip using the file manager. I extracted the WordPress file and then installed WordPress to create new tables in the new MySQL database. I then exported the new wp_option table in the PHP MyAdin tool for the new WordPress and saved it to my local drive. I then dropped the MySQL table wp_options in the old WordPress database then imported the new wp_options table. Unfortunately, this meant I lost all my theme settings which had to be redone. It took a while, but at least I retained all my uploaded media files. I then created a backup of the database and the files and saved them on my local drive, and installed Updrafts Plus plugin and created a local backup. Always backup your database and files in case something like this happens!
- This reply was modified 7 years, 5 months ago by CHomko.
Forum: Fixing WordPress
In reply to: Fatal error: Uncaught Error: Class ‘PasswordHash’ not foundThanks, but disabling plugins and the theme did not help.
Forum: Plugins
In reply to: [Wiki] Change Wiki Archive page to list only parent wikisOK, ignore the code I have above. I forgot the loop and changed it anyway. So here is the code that WORKS:
<?php //Place this php file in theme folder $args = array( 'post_type' => 'incsub_wiki', 'numberposts' => -1, 'tax_query' => array( array( 'taxonomy' => 'incsub_wiki_category', 'field' => 'slug', 'terms' => 'root', // Where slug of Root is "Root". 'include_children' => TRUE, 'operator' => 'IN', ), ), ); $the_query = new WP_Query( $args ); get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <h1 style="text-decoration: underline;">My Wikis</h1> <!-- Display this text as title --> </br> <!-- Add a line between the title and Wiki titles --> <!-- Begin the Loop --> <?php if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); ?><a href="<?php the_permalink(); ?>"><?php the_title( '<h3>', '</h3>' ); ?></a><?php ; } } else { echo wpautop( 'No Wikis were found, please add some' ); // no posts found } ?> <!-- End of the Loop --> </div><!-- #content --> </div><!-- #primary --> <?php wp_reset_postdata() ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
So to get this to work, you need to do 2 things:
1. Place this code in a file named archive-incsub_wiki.php and place the php file in your theme folder.
2. Create a Wiki Category of “Root” with a slug of “root” and tag your root Wikis with that category.Now the archive page will only show the names root Wikis as hyperlinks.
Yes, it has options for that. Install the plugin and on your dashboard click on Appearance > Menus, then you click on a menu item’s down arrow to see the checkbox “Enable Conditional Logic”. Checkmark the box and click on the drop down “User is Logged In” to see other available conditions. You would want to select “User is Admin” for logged in Admin users and “Show” or “Hide” depending on what you want.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] conditional statement for a categoryYou could also do it this way which is much simpler:
add_filter( 'if_menu_conditions', 'my_new_menu_conditions' ); function my_new_menu_conditions( $conditions ) { $conditions[] = array( 'name' => 'Schedule 2', // name of the condition 'condition' => function($item) { // callback - must return TRUE or FALSE return is_category( 'sched2' ); } ); return $conditions; }
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] ui is not showing up in 4.2.2I’m using WooThemes Canvas with WordPress 4.3 “Billie” and it works fine for me.
When you go to Appearances > Menus – are you not seeing the checkbox “Enable Conditional Logic” under “Move …”?
If not, i’d try disabling plugins one at a time to see if you get that checkbox. If still not, it may be a theme issue.
Forum: Plugins
In reply to: [WP Job Manager] Changing what the job application APPLY FOR JOB button doesAnd if you want the link to open in a new window:
<?php if ( $apply = get_the_job_application_method() ) :
wp_enqueue_script( ‘wp-job-manager-job-application’ );
?>
<div class=”job_application application”>
<?php do_action( ‘job_application_start’, $apply ); ?><input type=”button” class=”application_button button” onclick=”window.open(‘https://YOUR URL HERE/’)” value=”Apply Now” />
<?php do_action( ‘job_application_end’, $apply ); ?>
</div>
<?php endif; ?>Forum: Plugins
In reply to: [WP Job Manager] Changing what the job application APPLY FOR JOB button doesI figured it out myself. I changed wp-job-manager/templates/job-application.php to:
<?php if ( $apply = get_the_job_application_method() ) :
wp_enqueue_script( ‘wp-job-manager-job-application’ );
?>
<div class=”job_application application”>
<?php do_action( ‘job_application_start’, $apply ); ?><input type=”button” class=”application_button button” onclick=”location.href=’https://MY PAGE URL HERE/’;” value=”Apply Now” />
<?php do_action( ‘job_application_end’, $apply ); ?>
</div>
<?php endif; ?>