Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #305076

    Hi,

    I’m working on a development site at the moment – it will be moved once I’ve got it working properly.
    The site uses the WP Job Manager plugins and a few others.

    The site displays jobs in a list, which then link to single jobs. The main list can be searched by keyword and locations. Logged out (and logged in) visitors can view the whole list of jobs in a table form, and clicking a job takes you to a single job page. Alternatively, you can click a ‘jobs in xxxxxx’ item from the jobs menu which takes you to a listing of all jobs in a specific region (ie. Europe).

    My problems are as follows:

    1) Clicking the ‘jobs in Europe’ link brings you to the page “www.eltjob.com/?job_listing_region=europe” and this outputs the jobs as if they were blog entries. I don’t actually want this, but for now it will do. However, the page title says “Archive for: Europe”. The page breadcrumbs say You are here: Home / Europe and the page title should be Europe….but it’s not. How do I change this? There will probably be an archive of this type in future (archived old jobs), so the titles would be even more confusing.

    2) The second issue relates to single job ages – for example “www.eltjob.com/job/torino-1/”. The problem is that this page, and all other jobs, are given the same title “Blog” which is about the least desirable title possible!

    Also, exactly the same issue (page title ‘blog’) affects pages where logged-on jobsekers have their online resumes. For the jobseeker it probably doesn’t mater, even if it looks weird, but for an employer browsing resumes it would look even stranger to see the same title over and over again.

    How do I change these things? The first question is less important, but how do I get these single job and resume pages (which obviously use the blog page for their output) to show something other than ‘blog’? I haven’t finished setting stuff up yet so I’m betting this is certain to pop up on other pages.

    3) Does this theme have a themed logn page? I can’t see one. If not, is there a plugin which you know is compatible that allows a custom logon? Thanks.

    I’d be grateful for your suggestions.
    Brian

    #305179

    Hi brian7454!

    Thank you for using Enfold.

    1.) You can remove the avia_which_archive function’s default title with this on functions.php:

    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
    		if ( is_category() )
    		{
    			$output = __('','avia_framework')." ".single_cat_title('',false);
    		}
    		elseif (is_day())
    		{
    			$output = __('','avia_framework')." ".get_the_time( __('F jS, Y','avia_framework') );
    		}
    		elseif (is_month())
    		{
    			$output = __('','avia_framework')." ".get_the_time( __('F, Y','avia_framework') );
    		}
    		elseif (is_year())
    		{
    			$output = __('','avia_framework')." ".get_the_time( __('Y','avia_framework') );
    		}
    
    		if(!empty($output)) $args['title'] = $output;
    
    return 

    2.) Add this one in order to input the actual name of the post instead the word “Blog” for single post view:

    add_filter('avf_title_args', 'fix_blog_page_title', 10, 1);
    function fix_blog_page_title($args) {
    if(is_singular() && !is_page()) {
    $args['title'] = get_the_title();
    $args['link'] = get_permalink();
    }
    return $args;
    }

    3.) No, unfortunately, it doesn’t have a login page but you can browse the wordpress plugin library for such plugins. Honestly, we haven’t tested this kind of plugins yet but I’m sure they won’t interfere with the theme.

    Cheers!
    Ismael

    #305272

    Hi, thanks for that, but all it did as give me a pretty white page…. I’m no expert but I think the first bit of code needs something to close it. I tried to do it but didn’t succeed. I had to delete the code.

    #305274

    Actually, I tried adding ; } to close the first piece of code, and it allowed the pages to open, but they had no titles at all.
    The title block just didn’t display at all. Rather than make a mess, I gave up and will wait for your help!

    Thanks

    #305697

    Hey!

    I fixed the code. Replace all the above with:

    
    add_filter('avf_title_args', 'fix_single_post_title', 50, 2);
    function fix_single_post_title($args,$id)
    {
    		if ( is_category() )
    		{
    			$output = __('','avia_framework')." ".single_cat_title('',false);
    		}
    		elseif (is_day())
    		{
    			$output = __('','avia_framework')." ".get_the_time( __('F jS, Y','avia_framework') );
    		}
    		elseif (is_month())
    		{
    			$output = __('','avia_framework')." ".get_the_time( __('F, Y','avia_framework') );
    		}
    		elseif (is_year())
    		{
    			$output = __('','avia_framework')." ".get_the_time( __('Y','avia_framework') );
    		}
    
    		if(!empty($output)) $args['title'] = $output;
    
    		return $args;
    }
    
    add_filter('avf_title_args', 'fix_blog_page_title', 60, 1);
    function fix_blog_page_title($args) {
    	if(is_singular() && !is_page()) 
    	{
    		$args['title'] = get_the_title();
    		$args['link'] = get_permalink();
    	}
    	return $args;
    }
    

    Cheers!
    Günter

    #305796

    Sorry but that does exactly the same. Added to functions.php it just creates a white screen. I’m assuming it was intended for functions.php? I believe I gave you an admin login in my first post; can you take a look because unless I’m doing something wrong (with cut and paste?) there must be an error in the code.

    I have now deleted the code.

    Thanks

    #305803

    Ignore my previous:

    Sorry; upon closer inspection I saw that there was part of the original code in my functions.php. I have now deleted that, and it no longer gives a white screen. However, although the single pages now show the correct title, the ‘archive’ pages (for example: http://www.eltjob.com/?job_listing_region=europe) still show ‘Archive for: Europe’ and I only want “Europe” (Ideally, I want “Jobs in Europe”). So, although the code doesn’t crash the pages, it doesn’t do the job fully.

    Is there something else I can change? Maybe I need to create a different template to output the data?

    #305814

    Hi!

    Thank you for your feedback.

    I now pasted the code in functions.php of your child theme, which you are using.

    if I now open http://www.eltjob.com/job/torino-1/, I find the headline with ESL English teachers in Torino, same as the post headline.

    Maybe you forgot to clear the browser cache or something went wrong with copy/paste.

    Regards,
    Günter

    #305945

    Yes, thanks for that. Actually, I gave thw rong link. My fault. The page type where the page titles are still wrong (which I think part of your code was for) is seen here: http://www.eltjob.com/?job_listing_region=europe whereas the individual pages (that I incorectly pasted the ink for) have been okay since the first code snippet.

    The one I mean has ‘Archive for:’ in the title.

    Brian

    #306115

    Hey Brian!

    Try with this code:

    add_filter('avf_title_args', 'change_title_for_Archives', 10, 1);
    function change_title_for_archives($args) {
    	if(is_archive()) $args['title'] = get_queried_object()->name;
    	return $args;
    }

    Cheers!
    Josue

    #308421

    That did the job, thanks!

    #308473

    You are welcome, glad we could help :)

    Regards,
    Josue

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Incorrect page titles’ is closed to new replies.