domain name system – Title: Server can’t find example.com: NXDOMAIN

I am having trouble setting up a local DNS server with forward and reverse zones.

Resolv.conf

search myco.nmm6145.com
nameserver 192.168.1.1
nameserver 192.168.1.2

named.conf

options {
    directory "/var/named";
    listen-on port 53 {any;};
    allow-query {localhost;};
    allow-transfer {any;};
    empty-zones-enable no;
    recursion yes;
    dnssec-enable yes;
    dnssec-validation yes;
    bindkeys-file "/etc/named.root.key";
    managed-keys-directory "/var/named/dynamic";
    pid-file "/run/named/named.pid";
    session-keyfile "/run/named/session.key";
};

zone "."            { type hint;    file "named.ca";    allow-query {any;};};
zone "0.0.127.in-addr.arpa."    { type master;  file "db.127.0.0";  allow-query{any;};};
zone "myco.nmm6145.com"     { type master;  file "db.myco";     allow-query{any;};};
zone "1.168.192.in-addr.arpa."  { type master;  file "db.192.168.1"; };
zone "20.168.192.in-addr.arpa." { type master;  file "db.192.168.20"; };

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

db.myco

$TTL 86400
@   SOA linserv.nmm6145.com hostmaster ( 2003080800 12h 15m 3w 3h )

; IAM NAME SERVER
    IN NS   linserv.nmm6145.com.
    IN NS   winserv.nmm6145.com.

; Canonical names
; More may need to be defined as the DNS group grows
localhost       A   127.0.0.1
linserv     IN  A   192.168.1.1
winserv     IN  A   192.168.1.2

; No Aliases yet
www     IN  CNAME   winclient

;No interface spec. names yet

db.192.168.20

$TTL 86400
;$ORIGIN 20.168.192.in-addr.arpa.
@   IN SOA  linserv.nmm6145.com hostmaster.myco.nmm6145.com. ( 2003080700 3h 15m 3w 3h )

;NS
@   IN NS   linserv.nmm6145.com.
@   IN NS   winserv.nmm6145.com.
@   IN PTR  nmm6145.com.

;Addr
linserv IN A    192.168.1.1
winserv IN A    192.168.1.2

;PTR
2   IN PTR  winserv.nmm6145.com.
1   IN PTR  linserv.nmm6145.com.

db.192.168.1

$TTL 86400
$ORIGIN 1.168.192.in-addr.arpa.
@   SOA linserv.nmm6145.com hostmaster.myco.nmm6145.com. ( 2003080600 3h 15m 3w 3h )

;NS
@   IN NS   linserv.nmm6145.com.
@   IN NS   winserv.nmm6145.com.
@   IN PTR  nmm6145.com

linserv IN A    192.168.1.1
winserv IN A    192.168.1.2

;PTR
192.168.1.1 IN PTR  linserv.nmm6145.com.
192.168.1.2 IN PTR  winserv.nmm6145.com.

db.127.0.0

$TTL 86400
$ORIGIN 0.0.127.in-addr.arpa.
@   IN SOA  linserv.nmm6145.com hostmaster.myco.nmm6145.com ( 2003080500 3h 15m 3w 3h )

; Define Name Server
    IN NS   linserv.nmm6145.com.
    IN NS   winserv.nmm6145.com.

; Give localhost ptr
1   IN PTR      localhost.

;Hostname to Address
;linserv IN A       127.0.0.1   

Here are some commands I have run to diagnose the issue:

nslookup @localhost linserv.myco.nmm6145.com

;;Got SERVFAIL reply from 192.168.122.1, trying next server

Unsure where the 122 subnet comes into play here, can’t seem to find it on any of my zone or config files.

dig nmm6145

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 16519
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;; nmm6145. IN A

;;SERVER: 192.168.1.2#53(192.168.1.2)

I have also tried to flush my cache via

$rndc flush

Show a custom post title in another custom post type in Meta box

I have created two custom post type. Suppose A and B.

I would like to fetch A custom post title in B in meta box in a drop-down.

I am not getting any solution.

Is anybody help me to find the solution.

Thanks in advance!!

Get title parrent page backend

Is het possible to get the name from the parrent page / parrent menu in WordPress?
I tried this

<?php
echo get_admin_page_title(get_admin_page_parent());
?>

But this returns only the current page name.

Hide title and SEO: question from a dummy

First of all I apologize for my English, I know it is not the best.
I’m doing a website using Generatepress theme. The editor offers an option to hide the title of the post/pages.
Maybe it’s a stupid question, but I’m a beginner: I wondering if hide the title of a page or a post is a SEO problem.
I mean, does Google will see H1 tag?
Thank you.

magento2.3 – How to show attribute before product title?

This is the attributes.phtml located in vendormagentomodule-catalogviewfrontendtemplatesproductview which shows additional attributes:

<?php
$_helper = $this->helper('MagentoCatalogHelperOutput');
$_product = $block->getProduct();
?>
<?php if ($_additional = $block->getAdditionalData()): ?>
<div class="additional-attributes-wrapper table-wrapper">
    <table class="data table additional-attributes" id="product-attribute-specs-table">
        <caption class="table-caption"><?= /* @escapeNotVerified */ __('More Information') ?></caption>
        <tbody>
        <?php foreach ($_additional as $_data): ?>
            <tr>
                <th class="col label" scope="row"><?= $block->escapeHtml($_data('label')) ?></th>
                <td class="col data" data-th="<?= $block->escapeHtml($_data('label')) ?>"><?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data('value'), $_data('code')) ?></td>           
                
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
</div>

I try to use this code for getting the attribute modell in the title.phtml located in appdesignfrontendCompanyVendorMagento_Themetemplateshtml but it doesn’t work:

if ($block->$_data('label') = 'modell'):

The code for title.phtml is:

<?php if ($title): ?>
<div class="page-title-wrapper<?php /* @escapeNotVerified */
echo $cssClass; ?>">
    <h1 class="page-title"
        <?php if ($block->getId()): ?> id="<?php /* @escapeNotVerified */
        echo $block->getId(); ?>" <?php endif; ?>
        <?php if ($block->getAddBaseAttributeAria()): ?>
            aria-labelledby="<?php /* @escapeNotVerified */
            echo $block->getAddBaseAttributeAria(); ?>"
        <?php endif; ?>>
        <?php /* @escapeNotVerified */
        

        $_helper = $this->helper('MagentoCatalogHelperOutput');
        $_product = $block->getProduct();
        if ($_additional = $block->getAdditionalData()):
            foreach ($_additional as $_data):
                if ($block->$_data('label') = 'modell'): //Tried here
                    echo $block->escapeHtml($_data('label'));
                    echo $_helper->productAttribute($_product, $_data('value'), $_data('code'));
                endif;
            endforeach;
        endif;
    
        
        echo $title ?>
    </h1>
    <?php echo $block->getChildHtml(); ?>
</div>

How can I get this work? Thanks

customization – How to change popular term checklist title when edit post?

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

How to check title is being entered in Title Case?

I would like to ensure that my titles are entered in Title Case. I would prefer to do this from the editor, before it is saved to the database, rather than altering what is displayed, or modifying existing titles.

8 – How to use the node title in the “Override title” field of contextual filter

Situation:

  • A view has a contextual filter on a field named type.

  • The view sorts by date and has the pager set to display 1 item (I want only the newest node).

  • I want to show type + the node title as the view title.

  • So, what I want to put in the Override title field is

    {{ arguments.field_type_value }} {{ title }}

But {{ title }} doesn’t work. It outputs nothing. This isn’t a surprise because (a) {{ title }} isn’t in the Replacement Patterns list and (b) I assume the view expects to display multiple nodes, so there isn’t just one {{ title }} to display.

Is there a straightforward way to do what I want to do using a view as I’m doing? There are reasons why I want to use a view.

7 – Autocomplete field where title is replaced with NID

I’m using Drupal 7 and I have made autocomplete function to be called on a field.

File my_module.module:

<?php    

function my_module_menu() {
        
    $items = array();

    $items('/autocomplete') = array(
        'title' => 'Autocomplete',
        'page callback' => 'companyAutocomplete',
        'access arguments' => array('autocomplete'),
        'type' => MENU_LOCAL_TASK,
        'weight' => 1,
        'file' => 'my_module.autocomplete.inc'
    );   
       
    return $items;
}

File my_module.autocomplete.inc:

<?php

function companyAutocomplete($fieldInput) {

    $returnArray = array();

    $query = db_select('node', 'n')
        ->fields('n', array('nid', 'title'))
        ->condition('n.title', '%'.db_like($fieldInput).'%', 'LIKE')
        ->condition('n.type', 'company', '=')
        ->orderBy('n.title', 'ASC')
        ->range(0, 10);

    // print strtr((string) $query, $query->arguments());

    $results = $query->execute();

    foreach ($results as $result) {
        $returnArray($result->title) = check_plain($result->title);
    }

    drupal_json_output($returnArray);
}

File template.php:

<?php

function my_theme_preprocess_field(&$vars) {

    if ($node = menu_get_object()) {

        if ($node->type == 'company') {

            if ($vars('element')('#field_name') == 'field_company') {
                $company = entity_metadata_wrapper('node', $vars('items')('0')('#markup'));
                $vars('items')('0')('#markup') = $company->label();
            }
        }
    }
}

and I have a field company (I use this field to enter NID):

$form('field_company') = array(
    '#type' => 'textfield',
    '#default_value' => $defaultCompany,
    '#title' => 'Company',
    '#autocomplete_path' => '/autocomplete',
);

When I type something in field, autocomplete returns correct text value of the searched term and that is ok.

How can I modify companyAutocomplete() function or the field itself for autocomplete to works as it is, but to write NID instead title in $form(‘field_company’)(‘und’)(0)(‘value’)?

woocommerce – Changing Title Tag on Shop Archive Page (current solution reverting to Title of First Product in Loop)

Firstly, add_theme_support( 'title-tag' ); is enabled in my theme.

I have two filters to modify titles, this one hooking on to the_title

add_filter( 'the_title', 'custom_account_endpoint_titles', 10, 2 );
function custom_account_endpoint_titles( $title ) {

// Currently only have conditions here for My Account pages (is_account_page())
// example: if ( isset( $wp_query->query_vars('edit-account') ) && is_account_page() ) {    

return $title;
}

Secondly I have another function which fixed some title issues on Account pages as well (if I do not add this, the My Account pages all revert to a title tag of simply My Account instead of the conditional statements set for the Title changed intended.

function theme_slug_filter_wp_title( $title_parts ) {
        $title_parts('title') = get_the_title();
    return $title_parts;
}

add_filter( 'document_title_parts', 'theme_slug_filter_wp_title' );

Doing a little debugging — adding a print_r on $title_parts in the document_title_parts function

<pre>Array
(
    (title) => Products
    (site) => Example.com
)
</pre>

One would think, that the Title on my Shop Archive page would just be Products, but that is not the case.

Doing the same print_r debugging on the the_title filter on my shop archive page…

brings back <pre>925 Sterling Silver.....</pre> (which is the name of the first product in the loop

followed by <pre>Shop</pre> for the breadcrumb

and then additionally above all my products in the shop archive, the title and a list of classes, but te html seems to be malformed when doing so which is odd:

<div class="grid_col">    <div <pre="">925 Sterling Silver...... class="shop-product hover-border nt-post-class masonry-item excerpt-none product type-product "

The only solution I have read which does not work is hooking onto the is_shop() function in my the_title filter, such as..

add_filter( 'the_title', 'custom_account_endpoint_titles', 10, 2 );
function custom_account_endpoint_titles( $title ) {
    global $wp_query;
    global $current_user;

    if (is_shop()) {
        return 'My Shop Archive';
    }

This does indeed change the <title> tag on the shop page to My Shop Archive… but then proceeds to change the title of all my products on the page to My Shop Archive!

enter image description here

What is the solution for just simply changing the <title> tag on my shops archive page without affecting the product titles like in the image above?