• Resolved Marco Puccetti

    (@webevolu)


    Hello, i’ve got a new great idea!! What a beautiful idea: a “Business directory”!
    My new Business directory! But how is called? Oh my god is [ redundant link removed ]

    Well i have installed my beautiful new plugin for wordpress and i got the new page style theme draft!
    Now i try the search button, to test something like cathegory, places and business to find. What’s happened? Nothing!! Oh my god nothing! What a disaster!
    Well, i’ve started to search a solution online, in order to find how to fix the thing and i found the wordpress support page!! Ho my god what a beautiful place!!

    Greetings apart, i’ve read the documentation on plugin page and started to understand something on the “wpjobmanager” plugin.
    At https://wpjobmanager.com/document/template-overrides/ this page: is described how to override the template process’s pages, in order to setup the customizations.
    On the other hand, someone says that is necessary to hook some new functions to set-up the customization.
    Well, for the first time i need to:

    1) Understand how the Listify send the keywords to the plugin (Listify use a Home template page built in for web-directory);
    2) Setup the customization to get the right result to the main page according with the parameters inserted in the search-form from the first page.

    Anybody knows how can i get these information?
    Thanks a lot
    Mark

    [ Signature and many links deleted ]

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Cena (a11n)

    (@cena)

    Hi @webevolu ,

    > Understand how the Listify send the keywords to the plugin (Listify use a Home template page built in for web-directory);

    Your best bet would be to contact Listify for this information.

    2) Setup the customization to get the right result to the main page according with the parameters inserted in the search-form from the first page.

    I don’t know what this means. Can you give a concrete example of what you’re referring to? In general, custom code is outside our scope of support.

    Best,
    Cena

    Thread Starter Marco Puccetti

    (@webevolu)

    Hello, how i’ve just understood reading the WPJobManager guide, there are some files to change in order to attach your code processing.
    This is different from Listify template, infact i’m just amazing about this, but now i’ve only to integrate new code and to test the new html UI is working.
    You suggest to contact Listify directly and i’ll try to do this too, in order to find the right solution in the minimum time, but i see there’s no possibility to post any new request on the support site.
    Have you ever worked with this template and plugin before?

    [ Many additional links deleted, stop doing that please ]

    • This reply was modified 4 years, 4 months ago by Marco Puccetti.
    • This reply was modified 4 years, 4 months ago by Marco Puccetti.
    • This reply was modified 4 years, 4 months ago by Marco Puccetti. Reason: modifications
    • This reply was modified 4 years, 4 months ago by Jan Dembowski.
    Thread Starter Marco Puccetti

    (@webevolu)

    Hello, i’ve just searched and studied a lot of WP Job Manager code, and i’ve found some questions.
    Fantastic, in my new Business directory i have a start page with three search field:

    – Business name/alias
    – Place
    – Cathegory

    The form related to the search-engine send the process to this link:
    /?post_type=job_listing

      I see that at each search nothing is returned as result.

    So anybody knows which module object is usefull in this computation?

    I think the “job-filters-home.php” should be the first one called in order to filter the job fields.
    This is the code:

    <?php
    /**
     * Search filters for the homepage.
     *
     * This is the same as <code>job-filters.php</code> except it uses a different class
     * as not to interfer with the WP Job Manager AJAX triggers.
     *
     * @since unknown
     */
    
    global $listify_job_manager;
    
    $atts = apply_filters(
    	'job_manager_output_jobs_defaults',
    	array(
    		'per_page'                  => get_option( 'job_manager_per_page' ),
    		'orderby'                   => 'featured',
    		'order'                     => 'DESC',
    		'show_categories'           => true,
    		'categories'                => true,
    		'selected_category'         => false,
    		'job_types'                 => false,
    		'location'                  => false,
    		'keywords'                  => false,
    		'selected_job_types'        => false,
    		'show_category_multiselect' => false,
    		'selected_region'           => false,
    		'flat'                      => true,
    	)
    );
    
    $filters = Listify_WP_Job_Manager_Template_Filters::get_filters( 'home', $atts );
    
    if ( empty( $filters ) ) {
    	return;
    }
    ?>
    
    <?php do_action( 'job_manager_job_filters_before', $atts ); ?>
    
    <form class="job_search_form job_search_form--count-<?php echo absint( count( $filters ) ); ?>" action="<?php echo esc_url( listify_get_listings_page_url() ); ?>" method="GET">
    	<?php do_action( 'job_manager_job_filters_start', $atts ); ?>
    
    	<div class="search_jobs">
    		<?php do_action( 'job_manager_job_filters_search_jobs_start', $atts ); ?>
    		
    		<?php foreach ( $filters as $key => $filter ) : ?>
    			<?php echo $filter; // WPCS: XSS ok. ?>
    		<?php endforeach; ?>
    
    		<?php do_action( 'job_manager_job_filters_search_jobs_end', $atts ); ?>
    	</div>
    
    	<?php do_action( 'job_manager_job_filters_end', $atts ); ?>
    </form>
    
    <?php do_action( 'job_manager_job_filters_after', $atts ); ?>

    Now, when the search form is called, what are the processing sequence?
    I know job_manager_job_filters_search_jobs_start and job_manager_job_filters_search_jobs_end could be the answare but i don’t find the sources, although the functions.php is ready to accept new hook to specialize the code.

    Any idea?

    [ Many links deleted ]

    • This reply was modified 4 years, 4 months ago by Jan Dembowski.
    Thread Starter Marco Puccetti

    (@webevolu)

    Hi everybody!!
    I’ve just tried one possible solution in order to get the WPJobManager fields from the submit form in the start page.
    Well, i’ve used the standard solution proposed in the guide, this is the code:

    function custom_submit_job_form_fields( $fields ) {
    
        // Here we target one of the job fields (job_title) and change it's label
        //$fields['job']['job_title']['label'] = "Custom Label";
    
        //recursive print content
        //array_walk_recursive($fields, 'print_recursive_debug_spec');
    	echo "Pippo::start";
    	print_r ($fields);
    	echo "Pippo::end";
        // And return the modified fields
        return $fields;
    }
    // Add filter to get job submit data
    add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' );

    I’ve reloaded wordpress and launched the search button from the start page, but it seems to not send me information on screen (i expect something like Pippo::start —–Pippo.:end).

    The file in which i have added the code is the listify-child/functions.php

    [ More links deleted ]

    • This reply was modified 4 years, 4 months ago by Jan Dembowski.
    Thread Starter Marco Puccetti

    (@webevolu)

    Hi everybody, a little bit progress!!
    I’ve found some usefull filters to get the search box data, but i’ve noticed i need to specialize the search progress with the $_GET[] fields got from the main search page and populate the search data-structure used to get the right results.
    I see the actual working is not properly linked.
    Reading the code i expect some other filter’s function and exploring the solution on github, i’ve discovered the main data structure used from the plugin to work properly (class class-wp-job-manager-form-submit-job.php).
    Now i need to know if the “meta_query” can be usefull to specialize the search, or there’s another simple manner usefull to do this?
    The $query_args['meta_query'] from https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/ is a pre-initalized data? Now i have not a complete vision of all the plugin developed, sorry!!

    Sure i’ll get the right answare!!
    Mark

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Side note @webevolu Could you please stop spamming the forums with your links? Stick to that one site, use the link field.

    Your many additional links have been removed.

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi @webevolu ,

    As mentioned earlier, we can’t help with custom code like this; either creating or troubleshooting.

    That said, I still don’t understand what you’re trying to accomplish, so I can’t suggest alternatives (if any). ?? Can you briefly summarize your goal?

    Best,
    Cena

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customizing The Listify Theme and “wpjobmanager” plugin!!’ is closed to new replies.