Forum Replies Created

Viewing 15 replies - 1 through 15 (of 190 total)
  • Thread Starter Muhammad Junaid

    (@mj00712)

    But with frontend submission, Publicize is enabled by default (Reference Link). Could you provide a snippet to allow it for posts published via the admin area? Thanks!

    • This reply was modified 11 months, 2 weeks ago by Muhammad Junaid. Reason: Reference Link added
    Thread Starter Muhammad Junaid

    (@mj00712)

    Update: I have switched to Generatepress theme and have added these in UCSS Selector Allowlist.

    .site-logo
    .toggled
    .main-navigation
    .menu-bar-item
    .menu-toggle
    mobile-menu
    .navbar-toggle-wrapper
    .header-menu-sidebar
    .menu-item-nav-search svg
    .header-menu-sidebar-inner
    .builder-item
    .builder-item--nav-icon
    .site-footer
    .footer--row-inner
    .footer-content-wrap
    *, ::after, ::before
    .nv-index-posts
    .nv-page-title-wrap
    .layout-grid .content
    .blog-entry-title

    Now I want to am I adding too much of these or is it ok?

    Thread Starter Muhammad Junaid

    (@mj00712)

    By Job Type I mean Employment Type, Full-Time, Part-Time etc. I have used this code and it shows on the frontend. Is it correct way to do it?

    // Add custom field to the job submission form
    add_filter( 'submit_job_form_fields', 'add_custom_job_type_field' );
    function add_custom_job_type_field( $fields ) {
    // Use a unique key (here, 'custom_job_type') to avoid conflict with WP Job Manager’s built-in taxonomies.
    $fields['job']['custom_job_type'] = array(
    'label' => __( 'Job Type', 'wp-job-manager' ),
    'type' => 'select', // Dropdown field
    'required' => true,
    'placeholder' => __( 'Select job type...', 'wp-job-manager' ),
    'priority' => 6.1,
    'default' => 'full-time',
    'options' => array(
    'full-time' => __( 'Full Time', 'wp-job-manager' ),
    'part-time' => __( 'Part Time', 'wp-job-manager' ),
    'freelance' => __( 'Freelance', 'wp-job-manager' ),
    ),
    );
    return $fields;
    }

    // Save the custom field value when a job is submitted/updated
    add_action( 'job_manager_update_job_data', 'save_custom_job_type_field', 10, 2 );
    function save_custom_job_type_field( $job_id, $values ) {
    if ( isset( $values['job']['custom_job_type'] ) ) {
    update_post_meta( $job_id, '_custom_job_type', sanitize_text_field( $values['job']['custom_job_type'] ) );
    }
    }

    Also, can you check if adding job type in structured data is correct?

    // Add Google structured data for Job Type

    add_filter( 'wpjm_get_job_listing_structured_data', 'add_job_type_structured_data' );

    function add_job_type_structured_data( $data ) {
    global $post;

    // Retrieve the custom job type from the post meta
    $job_type = get_post_meta( $post->ID, '_custom_job_type', true );

    if ( ! empty( $job_type ) ) {
    // Schema.org's JobPosting uses the "employmentType" property for this value.
    $data['employmentType'] = $job_type;
    }

    return $data;
    }
    Forum: Plugins
    In reply to: [AMP] AMP Errors
    Thread Starter Muhammad Junaid

    (@mj00712)

    Thanks. One other thing I want to know is that Is this the right way of implementing google analytics.

    One more thing I want to know Is this the right way of implementing Google Analytics? Using this code in the head

    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

    and Using this in body

    <amp-analytics type="gtag" data-credentials="include">
    <script type="application/json">
    {
      "vars" : {
        "gtag_id": "G-xxxx",
        "config" : {
          "<TARGET_ID>": { "groups": "default" }
        }
      }
    }
    </script>
    </amp-analytics>

    How can the same be done using AMP plugin analytics option?

    Thread Starter Muhammad Junaid

    (@mj00712)

    Thanks. The problem was solved in the latest update.

    Thread Starter Muhammad Junaid

    (@mj00712)

    Information
    AMP does not allow the use of JS <script> tags unless they are for loading AMP components, which are added automatically by the AMP plugin. For any page to be served as AMP, all invalid script tags must be removed from the page. Instead of custom or third-party JS, please consider using AMP components and functionality such as amp-bind and actions and events (as opposed to JS event handler attributes like onclick). Some custom JS can be added if encapsulated in the amp-script. Learn more about how AMP works.
    
    If all invalid markup is “removed” the page will be served as AMP. However, the impact that the removal has on the page must be assessed to determine if the result is acceptable. If any invalid markup is “kept” then the page will not be served as AMP.
    
    Error code
    DISALLOWED_TAG
    Invalid markup
    <script>
    Element name
    script
    Parent element
    form
    Text content
    Sources
    #1	Type:	 Theme
    Name:	Neve (neve)
    Function:	Neve\Views\Partials\Comments::render_comment_form()
    Action:	neve_do_comment_area (priority 10)
    Location:	inc/views/partials/comments.php:39
    #2	Type:	 Core
    Name:	wp-includes
    Function:	wp_comment_form_unfiltered_html_nonce()
    Action:	comment_form (priority 10)
    Location:	comment-template.php:1363
    Forum: Plugins
    In reply to: [AMP] AMP Errors
    Thread Starter Muhammad Junaid

    (@mj00712)

    Updated: ampwp-90598f67-1d4d-52cf-ab73-223b6cc31eb6

    I have tried my best to fix the errors. Now there is some issue with the theme(Neve). Although it is amp-compatible it still shows errors for

    [
    {
    "url": "https://filectory.com/people-steel-mills-limited-psmltd-jobs-2024-apply-online/",
    "type": "is_singular[post]",
    "label": "Post",
    "amp_url": "https://filectory.com/people-steel-mills-limited-psmltd-jobs-2024-apply-online/amp/",
    "validation_errors": [
    {
    "node_name": "script",
    "parent_name": "form",
    "code": "DISALLOWED_TAG",
    "type": "js_error",
    "node_attributes": {
    "type": "text/javascript"
    },
    "text": "\n/* /\n(function(){if(window===window.parent){document.getElementById(SINGLE_QUOTED_STRING).name=SINGLE_QUOTED_STRING;}})();\n/ ]]> */\n",
    "node_type": 1,
    "sources": [
    {
    "type": "theme",
    "name": "neve",
    "file": "inc/views/partials/comments.php",
    "line": 39,
    "function": "Neve\Views\Partials\Comments::render_comment_form",
    "hook": "neve_do_comment_area",
    "priority": 10
    }
    ]
    }
    ],
    "stale": true
    }
    ]
    Thread Starter Muhammad Junaid

    (@mj00712)

    Ok Thanks.

    Thread Starter Muhammad Junaid

    (@mj00712)

    There is some problem in

    background-image:url
    Thread Starter Muhammad Junaid

    (@mj00712)

    Yes, I have swift theme installed.

    Thread Starter Muhammad Junaid

    (@mj00712)

    Also, my admin area appears broken if the plugin is not in learning mode.

    Thread Starter Muhammad Junaid

    (@mj00712)

    Please check this Screenshot

    Thread Starter Muhammad Junaid

    (@mj00712)

    Just to let you know, the admin area appears to be broken, and this error is displayed in the console. If I disable the Wordfence plugin, the error goes away. Additionally, the Jetpack stats are not working. Only the URL with /wp-admin breaks the admin area. I have sent you a new report by Email.

    Thread Starter Muhammad Junaid

    (@mj00712)

    I have tried all these steps before creating this thread, but nothing worked.

    Thread Starter Muhammad Junaid

    (@mj00712)

    Thanks this worked for me.

    define('WP_REDIS_CLIENT', 'predis');
    define('WP_REDIS_SCHEME', 'tcp');
    define('WP_REDIS_HOST', '127.0.0.1');
    define('WP_REDIS_PORT', '6379');
Viewing 15 replies - 1 through 15 (of 190 total)