Jump to content

Search the Community

Showing results for tags 'tags'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 11 results

  1. For a long time, I think I have been using heading tags wrong on websites. They always show like this on Google. Websitename websitename.com/category?name=mystery Posted by Night Flyer; 7 days ago; 5 views. « first; « prev; 1 of 1; next »; last ». Contact Us; @ 2014 websitename Inc. All Rights Reserved. As you can see, Google takes all the heading tags on my page and puts them in the description of the search result. So I have finally come to the conclusion that I should not be using heading tags for those things. Am I correct on that?
  2. Are either of these OK depending on circumstance or stupid things I should never do? Is one or the other sensible/idiotic? Is there an obvious 'better' way? I think all the php tags opening and closing within the DIVs is untidy but it's static HTML therefore if there's a LOT of it it's easier on the server right/wrong? On the other hand, maybe all the open/close of php tags defeats the object. I'm applying for a web design apprenticeship (I know, I need one) so I'm trying to appear less stupid as much as make nice php. Many thanks in advance, I know I'll end up better off by asking here <?php // php in here ?> <div class='content header'> <?php include("includes/header.php"); ?> </div> <div class='content content1'> <?php include("includes/intro.php"); ?> </div> <div class='content content2'> <?php include("includes/quals.php"); ?> </div> <div class='content content3'> <?php include("includes/experience.php"); ?> </div> <div class='content content4'> <?php include("includes/hobbies-and-interests.php"); ?> </div> <?php // More php here ?> Or this one: <?php print("<div class='content header'>"); include("includes/header.php"); print("</div> \r\n <div class='content content1'>"); include("includes/intro.php"); print("</div> \r\n <div class='content content2'>"); include("includes/quals.php"); print("</div> \r\n <div class='content content3'>"); include("includes/experience.php"); print("</div> \r\n <div class='content content4'>"); include("includes/hobbies-and-interests.php"); print("</div> \r\n"); ?> test.zip
  3. Hey Everyone. I am hoping this is the right place to ask this question. I am using a new WordPress theme and it has native related post coding in it. The problem is the code uses Post Tags as the selection value instead of Post Category. I was wondering if anyone could help me with this strip of code. I want to change it so the theme gets Posts in the same Category, instead of Posts with the same Tags. * Display related posts. * * @return void */ function stag_related_posts() { global $post; if( stag_rcp_user_has_no_access() ) return; if( ! stag_theme_mod( 'post_settings', 'show_related_posts' ) ) return; $tags = wp_get_post_tags( $post->ID ); if ( count( $tags ) ) { $tags_ids = array(); foreach($tags as $individual_tag) { $tag_ids[] = $individual_tag->term_id; } $query = new WP_Query( array( 'tag__in' => $tags_ids, 'post__not_in' => array( $post->ID ), 'posts_per_page' => absint( stag_theme_mod( 'post_settings', 'related_posts_count' ) ), 'caller_get_posts' => 1 ) ); // Add filter to attach 'post-grid' class add_filter( 'stag_showing_related_posts', '__return_true' ); if( $query->have_posts() ) : echo '<section class="related-posts" data-layout="2-2-2-2">'; while( $query->have_posts() ) : $query->the_post(); get_template_part( 'content', get_post_format() ); endwhile; echo '</section>'; endif; } wp_reset_query(); remove_all_filters( 'stag_showing_related_posts' ); } I've tried simply replaces the words Tags with Categories, but it doesn't seem to do much. Any help would be greatly, greatly, appreciated.
  4. Right now I am using a session to get search's input terms and place them into meta tags(title). It works; the only issue is that the search terms lag 1 page behind. For eg. If i search "flowers" on first try, it will show flowers in the metas(title). Next I input "treehouse" in search; instead of "treehouse" showing in the metas, it'll still show me the previous term "flowers". Now if I do a third search with a new term, it won't show the new term in metas, it'll show me the previous term "treehouse". Why is this happening? Am I doing something wrong? This is only an issue with meta tags. Search itself works fine. It shows results on a page as it's suppose to.
  5. Normally you would add unique meta tags(title, description) for each page of the website. However, what if it's a user based website where a user can add posts with title and description? Is it better to add user's title/post name in the meta tags or keep it as your own?
  6. For instance, say I have a metas.php file. It includes the meta tags for 20 other pages in the website. What is the best way to generate relevant meta tags from metas.php and into 20 individual pages?
  7. Hello everyone, I have "Posts" table in my model. "Posts" table have these columns : ID , title , image , category , description , body , author , created_date. I want to extend my "Posts" table by adding a column "tags". I want my php website to compare one post with others by "tags". Is it this option good? or I must make a different table with foreign keys and tags. Please anwser me if you can the mySQL queries and the right database Model. Thenks
  8. I am retrieving text and HTML tags from a database while using this function to encode the values for the browser. foreach ($row as $key => &$value){ $value = htmlspecialchars_decode( htmlentities($value,ENT_QUOTES), ENT_NOQUOTES ); } Basically, I am looping through each row and converting quotes, single quotes, and other special characters to entities while keeping HTML tags. However, when there's tags like <a href="example.com"> the quotes are duplicated twice and outputs to this: <a href=""example.com""> What am I doing wrong?
  9. Hello there! I'm such a beginner in php coding, i don't know the trick yet. My question is: I have a site, the main files are header.php; index.php; footer.php. I include header and footer in index php The index.php contains the articles, with tags. I want to pass the tags form articles to header.php as meta information. I get the tags from a database query. How can i do this method? Thanks: Robert
  10. Helllo: Need to add the html tag <li>...</li> to this plz: preg_match('/^[a-z0-9_\/a\-\ ]+$/si',$va1) Thanks.
  11. Hello, My name is Steve and I just joined up here. Looks like a good community so far. I am learning PHP and use Wordpress alot and I would like some help with an issue I'm having. Apologies if this is in the wrong section. I would like to output tags that I have preset in the backend, into a dropdown list on the frontend. Think of a profile page where a user can select an option from a dropdown, well I would like the tags to appear here for the user to select from. There are however a couple of requirements. If the user changes the dropdown value it needs to submit this to the Database so that the value is set to the new option. Also if a user wanted to choose more than 1 tag up to a maximum of 5, how could I add into the code if the user clicks a small link, another dropdown appears for them to select from the tags, and then save this to the Database as well. To me this seems like a highly advanced thing to accomplish, but to you guys this may be quite easy. Any tips, suggestions or links will be greatly appreciated. Thanks, Steve
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.